Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / FileReader.webidl
bloba8b6764e2be099cfa4c731346f1b8e2cd0b27166
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 [Constructor,
14  Exposed=(Window,Worker)]
15 interface FileReader : EventTarget {
16   // async read methods
17   [Throws]
18   void readAsArrayBuffer(Blob blob);
19   [Throws]
20   void readAsBinaryString(Blob filedata);
21   [Throws]
22   void readAsText(Blob blob, optional DOMString label);
23   [Throws]
24   void readAsDataURL(Blob blob);
26   void abort();
28   // states
29   const unsigned short EMPTY = 0;
30   const unsigned short LOADING = 1;
31   const unsigned short DONE = 2;
34   readonly attribute unsigned short readyState;
36   // File or Blob data
37   // bug 858217: readonly attribute (DOMString or ArrayBuffer)? result;
38   [Throws]
39   readonly attribute any result;
41   readonly attribute DOMException? error;
43   // event handler attributes
44   attribute EventHandler onloadstart;
45   attribute EventHandler onprogress;
46   attribute EventHandler onload;
47   attribute EventHandler onabort;
48   attribute EventHandler onerror;
49   attribute EventHandler onloadend;