| 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
|
| }
|
|
|