Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(980)

Unified Diff: Source/core/fileapi/FileReader.idl

Issue 1153543012: Sync the File API interfaces with the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fileapi/FilePropertyBag.idl ('k') | Source/core/fileapi/FileReaderSync.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/FileReader.idl
diff --git a/Source/core/fileapi/FileReader.idl b/Source/core/fileapi/FileReader.idl
index 320a20c30f3f948f0fb8aadf56d57bb651a57b3a..2e0989349f314dd1c798dfc2ab6ba72cfa1c7c44 100644
--- a/Source/core/fileapi/FileReader.idl
+++ b/Source/core/fileapi/FileReader.idl
@@ -29,6 +29,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// https://w3c.github.io/FileAPI/#APIASynch
+
[
GarbageCollected,
ActiveDOMObject,
@@ -37,25 +39,30 @@
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
+ // 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
+ readonly attribute FileError? error;
+ // event handler attributes
attribute EventHandler onloadstart;
attribute EventHandler onprogress;
attribute EventHandler onload;
« no previous file with comments | « Source/core/fileapi/FilePropertyBag.idl ('k') | Source/core/fileapi/FileReaderSync.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698