Custom element creation constructor.
This constructor is used by the DOM when a custom element has been created. It can only be invoked by subclasses of Element from that classes created constructor.
class CustomElement extends Element {
factory CustomElement() => new Element.tag('x-custom');
CustomElement.created() : super.created() {
// Perform any element initialization.
}
}
document.registerElement('x-custom', CustomElement);
Source
Element.created() : super._created() { // Validate that this is a custom element & possibly perform additional // initialization. _blink.Blink_Utils.initializeCustomElement(this); }