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

Unified Diff: lib/html/templates/html/dart2js/factoryprovider_Blob.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_Blob.darttemplate
diff --git a/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate b/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate
index f1d863063e2b64561c27c88666877cefcc404f34..886b77c92394d15b87febcad50fd433378e709cd 100644
--- a/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate
+++ b/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate
@@ -16,9 +16,9 @@ class $FACTORYPROVIDER {
return _create_2(blobParts, bag);
}
- static _create_1(parts) native 'return new Blob(parts);';
- static _create_2(parts, bag) native 'return new Blob(parts, bag);';
+ static _create_1(parts) => JS('Blob', 'new Blob(#)', parts);
+ static _create_2(parts, bag) => JS('Blob', 'new Blob(#, #)', parts, bag);
- static _create_bag() native 'return {}';
- static _bag_set(bag, key, value) native 'bag[key] = value;';
+ static _create_bag() => JS('var', '{}');
+ static _bag_set(bag, key, value) { JS('void', '#[#] = #', bag, key, value); }
}

Powered by Google App Engine
This is Rietveld 408576698