Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: tools/dom/templates/html/impl/impl_Node.darttemplate

Issue 1373563004: Fixed a bunch of failure cases for custom elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Node.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 38fdab1d9973adda7e41de88d832baee9790be82..23b4afe8c94dbe26c20891a5b0334cbeb7744562 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -197,7 +197,18 @@ $endif
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
// Custom element created callback.
+$if DART2JS
Node._created() : super._created();
+$else
+ Node._created() : super._created() {
+ // By this point blink_jsObject should be setup if it's not then we weren't
+ // called by the registerElement createdCallback - probably created() was
+ // called directly which is verboten.
+ if (this.blink_jsObject == null) {
+ throw new DomException.jsInterop("the created constructor cannot be called directly");
+ }
+ }
+$endif
/**
* A modifiable list of this node's children.
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698