OLD | NEW |
(Empty) | |
| 1 [Constructor, |
| 2 Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blo
bParts, optional BlobPropertyBag options), Exposed=Window,Worker] |
| 3 interface Blob { |
| 4 |
| 5 readonly attribute unsigned long long size; |
| 6 readonly attribute DOMString type; |
| 7 readonly attribute boolean isClosed; |
| 8 |
| 9 //slice Blob into byte-ranged chunks |
| 10 |
| 11 Blob slice([Clamp] optional long long start, |
| 12 [Clamp] optional long long end, |
| 13 optional DOMString contentType); |
| 14 void close(); |
| 15 |
| 16 }; |
| 17 |
| 18 dictionary BlobPropertyBag { |
| 19 DOMString type = ""; |
| 20 }; |
| 21 |
| 22 [Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fil
eBits, |
| 23 [EnsureUTF16] DOMString fileName, optional FilePropertyBag options), Exposed=Win
dow,Worker] |
| 24 interface File : Blob { |
| 25 |
| 26 readonly attribute DOMString name; |
| 27 readonly attribute long long lastModified; |
| 28 |
| 29 }; |
| 30 |
| 31 dictionary FilePropertyBag { |
| 32 |
| 33 DOMString type = ""; |
| 34 long long lastModified; |
| 35 |
| 36 }; |
| 37 |
| 38 [Exposed=Window,Worker] interface FileList { |
| 39 getter File? item(unsigned long index); |
| 40 readonly attribute unsigned long length; |
| 41 }; |
| 42 |
| 43 [Constructor, Exposed=Window,Worker] |
| 44 interface FileReader: EventTarget { |
| 45 |
| 46 // async read methods |
| 47 void readAsArrayBuffer(Blob blob); |
| 48 void readAsText(Blob blob, optional DOMString label); |
| 49 void readAsDataURL(Blob blob); |
| 50 |
| 51 void abort(); |
| 52 |
| 53 // states |
| 54 const unsigned short EMPTY = 0; |
| 55 const unsigned short LOADING = 1; |
| 56 const unsigned short DONE = 2; |
| 57 |
| 58 readonly attribute unsigned short readyState; |
| 59 |
| 60 // File or Blob data |
| 61 readonly attribute (DOMString or ArrayBuffer)? result; |
| 62 |
| 63 readonly attribute DOMError? error; |
| 64 |
| 65 // event handler attributes |
| 66 attribute EventHandler onloadstart; |
| 67 attribute EventHandler onprogress; |
| 68 attribute EventHandler onload; |
| 69 attribute EventHandler onabort; |
| 70 attribute EventHandler onerror; |
| 71 attribute EventHandler onloadend; |
| 72 |
| 73 }; |
| 74 |
| 75 partial interface URL { |
| 76 |
| 77 static DOMString createObjectURL(Blob blob); |
| 78 static DOMString createFor(Blob blob); |
| 79 static void revokeObjectURL(DOMString url); |
| 80 |
| 81 }; |
OLD | NEW |