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

Unified Diff: tests/html/utils.dart

Issue 23498053: Revert "Revert "Dart2js support for custom element lifecycle events"" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
Index: tests/html/utils.dart
diff --git a/tests/html/utils.dart b/tests/html/utils.dart
index 2533f24997b2a34e3694967f82611187efaafa29..04c8235353f0303d9a0ce03b5971b9d6f0414c15 100644
--- a/tests/html/utils.dart
+++ b/tests/html/utils.dart
@@ -159,3 +159,17 @@ void validateNodeTree(Node a, Node b, [String path = '']) {
validateNodeTree(a.nodes[i], b.nodes[i], '$path[$i].');
}
}
+
+Future loadCustomElementPolyfill() {
+ if (!document.supportsRegister) {
+ var script = new ScriptElement()
+ ..src = '/packages/custom_element/custom-elements.debug.js';
+ document.head.append(script);
+ return document.body.on['WebComponentsReady'].first;
+ }
+ return new Future.value();
+}
+
+Future loadPolyfills() {
+ return loadCustomElementPolyfill();
+}

Powered by Google App Engine
This is Rietveld 408576698