mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #4108 : shinglyu/servo/blob, r=jdm
Let's build this incrementally. I implemented a `Blob` that can hold a `DOMString`, and has `size` attribute and `slice(...)` method. I'll finish the rest in later PRs.
This commit is contained in:
commit
d2a67abea9
6 changed files with 125 additions and 22 deletions
|
@ -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();
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue