summaryrefslogtreecommitdiff
path: root/Source/WebCore/fileapi/FileReader.idl
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/fileapi/FileReader.idl')
-rw-r--r--Source/WebCore/fileapi/FileReader.idl40
1 files changed, 14 insertions, 26 deletions
diff --git a/Source/WebCore/fileapi/FileReader.idl b/Source/WebCore/fileapi/FileReader.idl
index 6ad56e323..a033a3b8d 100644
--- a/Source/WebCore/fileapi/FileReader.idl
+++ b/Source/WebCore/fileapi/FileReader.idl
@@ -30,46 +30,34 @@
*/
[
- GlobalContext=DOMWindow&WorkerGlobalScope,
- Conditional=BLOB,
+ Exposed=(Window,Worker),
ActiveDOMObject,
Constructor,
ConstructorCallWith=ScriptExecutionContext,
- EventTarget,
- JSNoStaticTables,
-] interface FileReader {
+] interface FileReader : EventTarget {
// ready states
const unsigned short EMPTY = 0;
const unsigned short LOADING = 1;
const unsigned short DONE = 2;
readonly attribute unsigned short readyState;
+ // FIXME: In all four methods found below, the blob parameter should not be nullable.
// async read methods
- [RaisesException] void readAsArrayBuffer(Blob blob);
- [RaisesException] void readAsBinaryString(Blob blob);
- [RaisesException] void readAsText(Blob blob, optional DOMString encoding);
- [RaisesException] void readAsDataURL(Blob blob);
+ [MayThrowException] void readAsArrayBuffer(Blob? blob);
+ [MayThrowException] void readAsBinaryString(Blob? blob);
+ [MayThrowException] void readAsText(Blob? blob, optional DOMString encoding);
+ [MayThrowException] void readAsDataURL(Blob? blob);
void abort();
- // file data
- [Custom] readonly attribute any result;
+ readonly attribute (DOMString or ArrayBuffer)? result;
readonly attribute FileError error;
- // EventTarget interface
- void addEventListener(DOMString type,
- EventListener listener,
- optional boolean useCapture);
- void removeEventListener(DOMString type,
- EventListener listener,
- optional boolean useCapture);
- [RaisesException] boolean dispatchEvent(Event evt);
-
- attribute EventListener onloadstart;
- attribute EventListener onprogress;
- attribute EventListener onload;
- attribute EventListener onabort;
- attribute EventListener onerror;
- attribute EventListener onloadend;
+ attribute EventHandler onloadstart;
+ attribute EventHandler onprogress;
+ attribute EventHandler onload;
+ attribute EventHandler onabort;
+ attribute EventHandler onerror;
+ attribute EventHandler onloadend;
};