The Editor's Draft of the FileAPI -- http://dev.w3.org/2006/webapi/FileAPI/ -- has had some updates. These are the notable changes:

1. Blob.slice behavior has changed to more closely match String.prototype.slice from ECMAScript (and Array.prototype.slice semantically). I think we're the first host object to have a slice outside of ECMAScript primitives; some builds of browsers have already vendor-prefixed slice till it becomes more stable (and till the new behavior becomes more diffuse on the web -- Blob will soon be used in the Canvas API, etc.). I'm optimistic this will happen soon enough. Thanks to all the browser projects that helped initiate the change -- the consistency is desirable.

2. The read methods on FileReader raise a new exception -- OperationNotAllowedException -- if multiple concurrent reads are invoked. I talked this over with Jonas; we think that rather than reuse DOMException error codes (like INVALID_STATE_ERR), these kinds of scenarios should throw a distinct exception. Some things on the web (as in life) are simply not allowed. It may be useful to reuse this exception in other places.

3. FileReader.abort( ) behavior has changed.

4. There is a closer integration with event loops as defined by HTML.

For browser projects with open bug databases, I'll log some bugs based on test cases I've run on each implementation. A few discrepancies exist in implementations I've tested; for instance, setting FileReader.result to the empty string vs. setting it to null, and when exceptions are thrown vs. use of the error event.

Feedback encouraged!  Draft at http://dev.w3.org/2006/webapi/FileAPI/

-- A*



Reply via email to