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/.
6 * The origin of this IDL file is
7 * https://w3c.github.io/FileAPI/#APIASynch
9 * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
13 [Exposed=(Window,Worker)]
14 interface FileReader : EventTarget {
19 undefined readAsArrayBuffer(Blob blob);
21 undefined readAsBinaryString(Blob filedata);
23 undefined readAsText(Blob blob, optional DOMString label);
25 undefined readAsDataURL(Blob blob);
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;