gecko-dev/testing/web-platform/tests/FileAPI/idlharness.idl
James Graham ee29b04f1c Bug 1291312 - Update web-platform-tests to revision 7a6a5c9f436730f86123e6f48a44bf1b7ba5654f, a=testonly
MozReview-Commit-ID: 2Z26QRXPNuK


--HG--
rename : testing/web-platform/tests/encrypted-media/Google/test-encrypted-different-av-keys.webm => testing/web-platform/tests/encrypted-media/Google/webm/test-encrypted-different-av-keys.webm
rename : testing/web-platform/tests/encrypted-media/Google/test-encrypted.webm => testing/web-platform/tests/encrypted-media/Google/webm/test-encrypted.webm
rename : testing/web-platform/tests/web-animations/timing-model/timelines/default-document-timeline.html => testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/document-timeline.html
rename : testing/web-platform/tests/web-animations/interfaces/DocumentTimeline/idlharness.html => testing/web-platform/tests/web-animations/interfaces/AnimationTimeline/idlharness.html
2016-08-04 23:34:05 +01:00

91 lines
2.2 KiB
Text

[Constructor,
Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options), Exposed=Window,Worker]
interface Blob {
readonly attribute unsigned long long size;
readonly attribute DOMString type;
readonly attribute boolean isClosed;
//slice Blob into byte-ranged chunks
Blob slice([Clamp] optional long long start,
[Clamp] optional long long end,
optional DOMString contentType);
void close();
};
dictionary BlobPropertyBag {
DOMString type = "";
};
[Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fileBits,
[EnsureUTF16] DOMString fileName, optional FilePropertyBag options), Exposed=Window,Worker]
interface File : Blob {
readonly attribute DOMString name;
readonly attribute long long lastModified;
};
dictionary FilePropertyBag {
DOMString type = "";
long long lastModified;
};
[Exposed=Window,Worker] interface FileList {
getter File? item(unsigned long index);
readonly attribute unsigned long length;
};
[Constructor, Exposed=Window,Worker]
interface FileReader: EventTarget {
// async read methods
void readAsArrayBuffer(Blob blob);
void readAsText(Blob blob, optional DOMString label);
void readAsDataURL(Blob blob);
void abort();
// states
const unsigned short EMPTY = 0;
const unsigned short LOADING = 1;
const unsigned short DONE = 2;
readonly attribute unsigned short readyState;
// File or Blob data
readonly attribute (DOMString or ArrayBuffer)? result;
readonly attribute DOMError? error;
// event handler attributes
attribute EventHandler onloadstart;
attribute EventHandler onprogress;
attribute EventHandler onload;
attribute EventHandler onabort;
attribute EventHandler onerror;
attribute EventHandler onloadend;
};
partial interface URL {
static DOMString createObjectURL(Blob blob);
static DOMString createFor(Blob blob);
static void revokeObjectURL(DOMString url);
};
[Constructor, Exposed=Worker]
interface FileReaderSync {
// Synchronously return strings
ArrayBuffer readAsArrayBuffer(Blob blob);
DOMString readAsText(Blob blob, optional DOMString label);
DOMString readAsDataURL(Blob blob);
};