On Mon, Oct 26, 2009 at 5:24 AM, Arun Ranganathan <a...@mozilla.com> wrote:
> The latest revision of the FileAPI editor's draft is available here:
> http://dev.w3.org/2006/webapi/FileAPI/

A few comments:

* loadend should fire after load/error/abort.
* I'm not sure i love the name 'fileData'. Maybe 'result' or simply
'data' is better.
* Whatever the name, I don't see why 'fileData' should only be
readable while an event is being fired. That seems unnecessarily
complicated, doesn't match XHR and seems less useful.
* fileData should probably be null rather than the empty string during
on error and before data is read.
* The second argument to 'splice' should be called 'length' rather
than 'offset'.
* I think someone had brought up a good argument for *not* throwing
when slice is called with start+offset > size. One of the main use
cases for slice is to slice up a file in several chunks when sending
with XHR. When that is done it's easy to end up with rounding errors
resulting in a slightly to large length being requested. In this case
it makes sense to just clamp to size rather than throwing an error.

/ Jonas

Reply via email to