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

Unified Diff: tools/dom/templates/html/impl/impl_Blob.darttemplate

Issue 1348173002: Dartium JS Enabled take 2 (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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: tools/dom/templates/html/impl/impl_Blob.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Blob.darttemplate b/tools/dom/templates/html/impl/impl_Blob.darttemplate
index 354281176393f9adc1d06c84bd190f975e813c93..0b124523a6077aad54dee8a9c628c58c92047055 100644
--- a/tools/dom/templates/html/impl/impl_Blob.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Blob.darttemplate
@@ -25,5 +25,22 @@ $if DART2JS
static _create_bag() => JS('var', '{}');
static _bag_set(bag, key, value) { JS('void', '#[#] = #', bag, key, value); }
+$else
+ $if JSINTEROP
+ factory Blob(List blobParts, [String type, String endings]) {
+ // TODO: any coercions on the elements of blobParts, e.g. coerce a typed
+ // array to ArrayBuffer if it is a total view.
+
+ var parts = convertDartToNative_List(blobParts.map(unwrap_jso).toList());
+ if (type == null && endings == null) {
+ return wrap_jso(_blink.BlinkBlob.instance.constructorCallback_1_(parts));
+ }
+ var bag = {};
+ if (type != null) bag['type'] = type;
+ if (endings != null) bag['endings'] = endings;
+ return wrap_jso(_blink.BlinkBlob.instance.constructorCallback_2_(parts,
+ convertDartToNative_Dictionary(bag)));
+ }
+ $endif
$endif
}

Powered by Google App Engine
This is Rietveld 408576698