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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
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:
Download patch
« no previous file with comments | « no previous file | tests/html/custom/document_register_template_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 2043449707e8e4baed88c8153fea0097a0bc187b..05fc09a5052ce3fc62606e0113185202a960e1f9 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -42882,8 +42882,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 | « no previous file | tests/html/custom/document_register_template_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698