Re: [File API] events vs callbacks

On Aug 19, 2009, at 1:55 AM, Anne van Kesteren wrote:

> On Tue, 18 Aug 2009 01:21:48 +0200, Nikunj R. Mehta <nikunj.mehta@oracle.com 
> > wrote:
>> On Aug 12, 2009, at 4:40 AM, Anne van Kesteren 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.
>>
>> Step 7 in the algorithm for open() [1] says to reject URLs in
>> unsupported schemes. Is there a way to find out supported schemes?  
>> The
>> spec says nothing normative about schemes other than HTTP (what about
>> HTTPS). Therefore, is it fair to assume that filedata uris are not
>> supported in XHR and that any browser doing otherwise is doing a  
>> favor?
>
> There's no way to find out supported schemes. The draft does not  
> mention the HTTP scheme at the moment. It mentions the HTTP protocol  
> (which includes HTTPS).

I read the Section 2.1 requirement to support XHR to mean that http  
scheme should be supported. However, more precise language would be  
appreciated.

> I'm not sure what you mean by "doing a favor".

Extended but non-specified behavior.

> Currently the behavior of other schemes is undefined. I should  
> probably tighten up the language a little bit around that.
>
>
>> [1] http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest
>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>

Nikunj
http://o-micron.blogspot.com

Received on Wednesday, 19 August 2009 16:12:03 UTC