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

Unified Diff: lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate

Issue 11094082: Convert legacy 'native code' to JS-forms in dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 8 years, 2 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: lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
diff --git a/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate b/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
index c1f081edebd73eb13427a3cabe5ef7f3a0804ddb..7d82ab5cc7ceaf97a8b9d61a409c83c5e3bb34bd 100644
--- a/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
+++ b/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
class $FACTORYPROVIDER {
- static ShadowRoot createShadowRoot(Element host) native '''
- return new (window.ShadowRoot || window.WebKitShadowRoot)(host);
- ''';
+ static ShadowRoot createShadowRoot(Element host) =>
+ JS('ShadowRoot',
+ 'new (window.ShadowRoot || window.WebKitShadowRoot)(#)', host);
}

Powered by Google App Engine
This is Rietveld 408576698