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

Unified Diff: lib/html/templates/html/dart2js/factoryprovider_SharedWorker.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_SharedWorker.darttemplate
diff --git a/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate b/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate
index 157caae906f6180319191d7d8d1a82d0de80eb96..bb3dcea512b9194431dee9ac4f5a8d0f338e8bf4 100644
--- a/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate
+++ b/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate
@@ -3,9 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
class $FACTORYPROVIDER {
- static SharedWorker createSharedWorker(String scriptURL, [String name])
- native '''
- if (name == null) return new SharedWorker(scriptURL);
- return new SharedWorker(scriptURL, name);
- ''';
+ static SharedWorker createSharedWorker(String scriptURL, [String name]) {
+ if (name == null) return JS('SharedWorker', 'new SharedWorker(#)', scriptURL);
+ return JS('SharedWorker', 'new SharedWorker(#,#)', scriptURL, name);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698