Chromium Code Reviews| 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..29627883e5bf6ff3b11584acdc5c5ac8c164a603 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() {} |
|
vsm
2013/10/01 16:58:01
Mark deprecated?
blois
2013/10/01 20:37:08
Done.
|
| /** |
| * Called by the DOM when this element has been inserted into the live |