Added a new ability to specify a slot for child elements of a IgniteElement to be placed in. Next up is a reconstruct method, which may or may not be possible, not sure.
This commit is contained in:
@ -7,6 +7,7 @@ class IgniteElement extends HTMLElement {
|
||||
|
||||
this.onDisconnected = null;
|
||||
this.template = null;
|
||||
this.elements = [];
|
||||
this.createProperties();
|
||||
}
|
||||
|
||||
@ -50,6 +51,9 @@ class IgniteElement extends HTMLElement {
|
||||
this.template.element = this;
|
||||
this.template.tagName = this.tagName;
|
||||
|
||||
//Add any childNodes we have to the elements list within this
|
||||
this.childNodes.forEach((item) => this.elements.push(item));
|
||||
|
||||
//Make sure the render template is our template, if not, add it as a child.
|
||||
var renderTemplate = this.render();
|
||||
if (renderTemplate !== this.template && renderTemplate) {
|
||||
|
Reference in New Issue
Block a user