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

Unified Diff: tools/dom/src/dart2js_CustomElementSupport.dart

Issue 2493703004: Support extending TemplateElement in IE11 + webcomponents-lite.js (Closed)
Patch Set: Created 4 years, 1 month 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 | « tests/html/custom/document_register_template_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dart2js_CustomElementSupport.dart
diff --git a/tools/dom/src/dart2js_CustomElementSupport.dart b/tools/dom/src/dart2js_CustomElementSupport.dart
index 62c120d0ba1af72440d214be874a9027e61a1f24..5f81b1869bb6483ef4494f5f8dbfb5efcbe0fdb7 100644
--- a/tools/dom/src/dart2js_CustomElementSupport.dart
+++ b/tools/dom/src/dart2js_CustomElementSupport.dart
@@ -163,8 +163,11 @@ class _JSElementUpgrader implements ElementUpgrader {
_nativeType = HtmlElement;
} else {
var element = document.createElement(extendsTag);
- if (!JS('bool', '(# instanceof window[#])',
- element, baseClassName)) {
+ if (!JS('bool', '(# instanceof window[#])', element, baseClassName) &&
+ // Exception to support template elements (extended for core pieces of
+ // Polymer 1.0) when using the webcomponents-lite.js polyfill on IE11:
+ !((extendsTag == 'template' &&
+ JS('bool', '(# instanceof window["HTMLUnknownElement"])', element)))) {
throw new UnsupportedError(
'extendsTag does not match base native class');
}
« no previous file with comments | « tests/html/custom/document_register_template_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698