Element.created constructor Null safety

Element.created()

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);

Implementation

Element.created() : super._created();