Blob.idl 722 B

1234567891011121314151617181920212223
  1. [Exposed=(Window,Worker), Serializable, UseNewAKString]
  2. interface Blob {
  3. constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options = {});
  4. readonly attribute unsigned long long size;
  5. readonly attribute DOMString type;
  6. // slice Blob into byte-ranged chunks
  7. Blob slice(optional long long start, optional long long end, optional DOMString contentType);
  8. // read from the Blob.
  9. [NewObject] Promise<USVString> text();
  10. [NewObject] Promise<ArrayBuffer> arrayBuffer();
  11. };
  12. enum EndingType { "transparent", "native" };
  13. dictionary BlobPropertyBag {
  14. DOMString type = "";
  15. EndingType endings = "transparent";
  16. };
  17. typedef (BufferSource or Blob or USVString) BlobPart;