Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / webidl / FileReader.webidl
blobf4dfeffb1247ea54bd9aff6740c5a8fbeef418f1
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://w3c.github.io/FileAPI/#APIASynch
8  *
9  * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 [Exposed=(Window,Worker)]
14 interface FileReader : EventTarget {
15   constructor();
17   // async read methods
18   [Throws]
19   undefined readAsArrayBuffer(Blob blob);
20   [Throws]
21   undefined readAsBinaryString(Blob filedata);
22   [Throws]
23   undefined readAsText(Blob blob, optional DOMString label);
24   [Throws]
25   undefined readAsDataURL(Blob blob);
27   undefined abort();
29   // states
30   const unsigned short EMPTY = 0;
31   const unsigned short LOADING = 1;
32   const unsigned short DONE = 2;
35   readonly attribute unsigned short readyState;
37   readonly attribute (DOMString or ArrayBuffer)? result;
39   readonly attribute DOMException? error;
41   // event handler attributes
42   attribute EventHandler onloadstart;
43   attribute EventHandler onprogress;
44   attribute EventHandler onload;
45   attribute EventHandler onabort;
46   attribute EventHandler onerror;
47   attribute EventHandler onloadend;