Re: [File API] events vs callbacks

On Wed, 12 Aug 2009 20:09:20 +0200, Jonas Sicking <jonas@sicking.cc> wrote:
> On Wednesday, August 12, 2009, Anne van Kesteren <annevk@opera.com>  
> wrote:
>> On Tue, 11 Aug 2009 22:57:51 +0200, Jonas Sicking <jonas@sicking.cc>  
>> wrote:
>>> xhr.open("GET", myFile.slice(x, y).fileDataURI);
>>> xhr.send();
>>
>> FWIW I'm opposed to abusing XMLHttpRequest in this way and I actually  
>> think that when using the filedata URL scheme some kind of exception  
>> needs to be thrown. Similarly to when you would use mailto or something.
>
> Why?

Because we'd need to define how this works and define that non-GET, non-null send(), setRequestHeader(), etc. are all not having any effect for filedata URLs. That seems silly. It seems way better to admit that XMLHttpRequest provides an HTTP API and not a File API, in my opinion.


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

Received on Wednesday, 12 August 2009 19:02:51 UTC