Fixed a few bugs and added a init method to ignite elements that can be used to setup stuff before the element is created.

This commit is contained in:
2020-11-09 09:38:00 -08:00
parent 3bee5614ab
commit 00cd30eb54
2 changed files with 27 additions and 9 deletions

View File

@@ -56,6 +56,9 @@ class IgniteElement extends HTMLElement {
this.elements = [];
this.createProperties();
this.readyCallback = new IgniteCallback(() => this.ready());
//Init the element before connected callback is fired.
this.init();
}
/**
@@ -275,6 +278,14 @@ class IgniteElement extends HTMLElement {
return null;
}
/**
* Called wehn this ignite element is being initialized. When this is called
* the element has not been created. This is good for login checking code or special setup code.
*/
init() {
}
/**
* Called when this ignite element is ready. This will invoke once all
* ignite elements on the current page have been rendered and setup. You can safely know