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

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

Issue 22967006: Adding polyfill support for custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/src/dart2js_CustomElementSupport.dart ('k') | tools/dom/src/dartium_Platform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dart2js_Platform.dart
diff --git a/tools/dom/src/dart2js_Platform.dart b/tools/dom/src/dart2js_Platform.dart
index 5988011c0cd3c1c048605dcb22c0a3c7360ff25e..ea50a6ae018d4c8d7f849c496f087c9516fd7653 100644
--- a/tools/dom/src/dart2js_Platform.dart
+++ b/tools/dom/src/dart2js_Platform.dart
@@ -18,4 +18,17 @@ class Platform {
* error.
*/
static final supportsSimd = false;
+
+ /**
+ * Upgrade all custom elements in the subtree which have not been upgraded.
+ *
+ * This is needed to cover timing scenarios which the custom element polyfill
+ * does not cover.
+ */
+ static void upgradeCustomElements(Node node) {
+ if (JS('bool', '(#.CustomElements && #.CustomElements.upgradeAll)',
+ window, window)) {
+ JS('', '#.CustomElements.upgradeAll(#)', window, node);
+ }
+ }
}
« no previous file with comments | « tools/dom/src/dart2js_CustomElementSupport.dart ('k') | tools/dom/src/dartium_Platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698