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:
@@ -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
|
||||
|
Reference in New Issue
Block a user