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

Unified Diff: lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.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: 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_TextTrackCue.darttemplate
diff --git a/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate b/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate
index b69ac65b3605c76a0dfe0fe3b460308475a9f134..41b068dbb9eada8732955a9fa9a7f409d4cf2725 100644
--- a/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate
+++ b/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate
@@ -5,12 +5,19 @@
class $FACTORYPROVIDER {
static TextTrackCue createTextTrackCue(
String id, num startTime, num endTime, String text,
- [String settings, bool pauseOnExit])
- native '''
- if (settings == null)
- return new TextTrackCue(id, startTime, endTime, text);
- if (pauseOnExit == null)
- return new TextTrackCue(id, startTime, endTime, text, settings);
- return new TextTrackCue(id, startTime, endTime, text, settings, pauseOnExit);
- ''';
+ [String settings, bool pauseOnExit]) {
+ if (settings == null) {
+ return JS('TextTrackCue',
+ 'new TextTrackCue(#,#,#,#)',
+ id, startTime, endTime, text);
+ }
+ if (pauseOnExit == null) {
+ return JS('TextTrackCue',
+ 'new TextTrackCue(#,#,#,#,#)',
+ id, startTime, endTime, text, settings);
+ }
+ return JS('TextTrackCue',
+ 'new TextTrackCue(#,#,#,#,#,#)',
+ id, startTime, endTime, text, settings, pauseOnExit);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698