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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
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:
Download patch
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | tests/co19/co19-dartium.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index b54fc767e4b5f34949acd24f8a9b146901d4def6..b9db444af8613cdfcc0f4ff17f14566fc0663aef 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -20088,6 +20088,10 @@ class HtmlDocument extends Document {
*/
void registerElement(String tag, Type customElementClass,
{String extendsTag}) {
+ // 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 | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | tests/co19/co19-dartium.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698