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

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

Issue 1857343002: Fix registerElement for HTMLElement prototype should not change it's m_type (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix registerElement for custom elements Created 4 years, 8 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/scripts/generate_blink_file.py ('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_HTMLDocument.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 7768aad24b928fdf6394d5bb2be7e647ac7ec78b..a52e369a14c8682d4c39a5de0842d88ba9ee5a9b 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -362,6 +362,10 @@ $if DART2JS
_registerCustomElement(JS('', 'window'), this, tag, customElementClass,
extendsTag);
$else
+ // Hack to setup an interceptor for HTMLElement so it isn't changed when a custom element is created.
+ var jsHTMLElementPrototype = js.JsNative.getProperty(js.JsNative.getProperty(js.context, 'HTMLElement'),'prototype');
+ _blink.Blink_Utils.defineInterceptor(jsHTMLElementPrototype, HtmlElement.instanceRuntimeType);
+
// Figure out which DOM class is being extended from the user's Dart class.
var classMirror = reflectClass(customElementClass);
« no previous file with comments | « tools/dom/scripts/generate_blink_file.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698