Index: core/fileapi/FileReader.idl |
diff --git a/core/fileapi/FileReader.idl b/core/fileapi/FileReader.idl |
index 1d10d87554c46ad7968abb385ca61b4f9833040f..1a032a90fb32f0361e526d89465b78284eb0ad30 100644 |
--- a/core/fileapi/FileReader.idl |
+++ b/core/fileapi/FileReader.idl |
@@ -29,33 +29,40 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
+// https://w3c.github.io/FileAPI/#APIASynch |
+ |
[ |
- WillBeGarbageCollected, |
+ GarbageCollected, |
ActiveDOMObject, |
Constructor, |
ConstructorCallWith=ExecutionContext, |
Exposed=(Window,Worker), |
TypeChecking=Interface |
] 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; |
- |
// async read methods |
[RaisesException] void readAsArrayBuffer(Blob blob); |
- [RaisesException] void readAsBinaryString(Blob blob); |
- [RaisesException] void readAsText(Blob blob, optional DOMString encoding); |
+ // TODO(philipj): readAsBinaryString() was removed from the spec in 2012: |
+ // https://github.com/w3c/FileAPI/commit/8cce54559dc27bf8b8244f3f0ca9fb3e4d96efdb |
+ [RaisesException, Measure] void readAsBinaryString(Blob blob); |
+ [RaisesException] void readAsText(Blob blob, optional DOMString label); |
[RaisesException] void readAsDataURL(Blob blob); |
void abort(); |
- // file data |
- [Custom=Getter] readonly attribute object result; |
+ // states |
+ const unsigned short EMPTY = 0; |
+ const unsigned short LOADING = 1; |
+ const unsigned short DONE = 2; |
+ |
+ readonly attribute unsigned short readyState; |
+ |
+ // File or Blob data |
+ readonly attribute (DOMString or ArrayBuffer)? result; |
- readonly attribute FileError error; |
+ // TODO(philipj): error should be DOMError. crbug.com/496901 |
+ [Measure] readonly attribute FileError? error; |
+ // event handler attributes |
attribute EventHandler onloadstart; |
attribute EventHandler onprogress; |
attribute EventHandler onload; |