Re: Alternative File API

On Mon, 17 Aug 2009 16:07:48 +0200, Arun Ranganathan <arun@mozilla.com> wrote:
> I'm willing to change the specification to support Events and Readers,  
> though I don't necessarily think it is "more JavaScripty."  I continue  
> to be concerned that we've made the model a bit more complex, but it  
> certainly is more powerful.  Progress Events seems to be the main use  
> case, and it seems our model has stretched to most elegantly accommodate  
> it.  So Data or BinaryData would no longer have accessors, but probably  
> have slice( ), size, etc.  Using the same 'isa' shorthand (which I  
> gather you're using from word grammar):
>
> Data -- represents raw data, has slice( ), has size
> File isa Data (File has mediaType, has url)
> DataReader isa EventTarget

I think having the flexibility is better. Presumably JavaScript libraries will continue to be around and provide convenience APIs. Come to think of it, maybe we should ask them to email some feedback on file API design to this list?


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 19 August 2009 09:38:33 UTC