| Index: tools/dom/templates/html/impl/impl_Element.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| index 5732c1ebd5469464a8cdc917a75156394a97d705..0e76f3819dc4742d21490654af70601567797850 100644
|
| --- a/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| @@ -334,6 +334,30 @@ $(ANNOTATIONS)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| }
|
|
|
| /**
|
| + * 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.register('x-custom', CustomElement);
|
| + */
|
| + Element.created(): super._created() {
|
| + // Validate that this is a custom element & perform any additional
|
| + // initialization.
|
| + _initializeCustomElement(this);
|
| +
|
| + createdCallback();
|
| + }
|
| +
|
| + /**
|
| * Creates the HTML element specified by the tag name.
|
| *
|
| * This is similar to [Document.createElement].
|
| @@ -678,7 +702,7 @@ $(ANNOTATIONS)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| * Called by the DOM when this element has been instantiated.
|
| */
|
| @Experimental()
|
| - void created() {}
|
| + void createdCallback() {}
|
|
|
| /**
|
| * Called by the DOM when this element has been inserted into the live
|
|
|