diff options
Diffstat (limited to 'components/script/dom/webidls/Blob.webidl')
-rw-r--r-- | components/script/dom/webidls/Blob.webidl | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/components/script/dom/webidls/Blob.webidl b/components/script/dom/webidls/Blob.webidl index 18a009d39a9..572879ec621 100644 --- a/components/script/dom/webidls/Blob.webidl +++ b/components/script/dom/webidls/Blob.webidl @@ -1,25 +1,29 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/FileAPI/#blob -[Constructor(optional sequence<BlobPart> blobParts, - optional BlobPropertyBag options), - Exposed=(Window,Worker)] +[Exposed=(Window,Worker)] interface Blob { + [Throws] constructor(optional sequence<BlobPart> blobParts, + optional BlobPropertyBag options = {}); readonly attribute unsigned long long size; readonly attribute DOMString type; // slice Blob into byte-ranged chunks - Blob slice([Clamp] optional long long start, - [Clamp] optional long long end, + Blob slice(optional [Clamp] long long start, + optional [Clamp] long long end, optional DOMString contentType); + + [NewObject] object stream(); + [NewObject] Promise<DOMString> text(); + [NewObject] Promise<ArrayBuffer> arrayBuffer(); }; dictionary BlobPropertyBag { DOMString type = ""; }; -typedef (/*ArrayBuffer or ArrayBufferView or */Blob or DOMString) BlobPart; +typedef (ArrayBuffer or ArrayBufferView or Blob or DOMString) BlobPart; |