dom/webidl/FileReader.webidl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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  * http://dev.w3.org/2006/webapi/FileAPI/#dfn-filereader
     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 interface FileReader : EventTarget {
    15   // async read methods
    16   [Throws]
    17   void readAsArrayBuffer(Blob blob);
    18   [Throws]
    19   void readAsText(Blob blob, optional DOMString label = "");
    20   [Throws]
    21   void readAsDataURL(Blob blob);
    23   [Throws]
    24   void abort();
    26   // states
    27   const unsigned short EMPTY = 0;
    28   const unsigned short LOADING = 1;
    29   const unsigned short DONE = 2;
    32   readonly attribute unsigned short readyState;
    34   // File or Blob data
    35   // bug 858217: readonly attribute (DOMString or ArrayBuffer)? result;
    36   [Throws]
    37   readonly attribute any result;
    39   readonly attribute DOMError? 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;
    48 };
    50 // Mozilla extensions.
    51 partial interface FileReader {
    52   [Throws]
    53   void readAsBinaryString(Blob filedata);
    54 };

mercurial