Issue #1820 - Improve the Blob implementation

This commit is contained in:
Shing Lyu 2014-11-14 23:56:48 +08:00 committed by Shing Lyu
parent bdb3a2538b
commit f2885b8fc7
6 changed files with 125 additions and 22 deletions

View file

@ -6,18 +6,23 @@
// http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
//[Exposed=Window,Worker][Constructor,
// Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options)]
[Constructor]
[Constructor,
Constructor(DOMString blobParts)]
interface Blob {
//readonly attribute unsigned long long size;
//readonly attribute DOMString type;
readonly attribute unsigned long long size;
readonly attribute DOMString type;
//readonly attribute boolean isClosed;
//slice Blob into byte-ranged chunks
//TODO: implement slice with [Clamp]
//Blob slice([Clamp] optional long long start,
// [Clamp] optional long long end,
// optional DOMString contentType);
Blob slice(optional long long start,
optional long long end,
optional DOMString contentType);
//void close();
};