W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [XHR2] Disable new response types for sync XHR in Window context

From: Matt Shulman <mattsh@google.com>
Date: Wed, 16 Nov 2011 08:10:55 -0800
Message-ID: <CAMuN6bzQJgHoM+A71SHZz2iPOGwj2xqz6nRkW7RtUftWvMDYDA@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>, Olli Pettay <Olli.Pettay@helsinki.fi>, "olli@pettay.fi" <olli@pettay.fi>
I sometimes like to write code in the window context (where debugging
support is much better) before moving it to a web worker, so it would
be awkward if the sync options differed on xhr between the two.
(Analogous to this - I remember once i was trying to use the new
FileSystemSync API and during development it would have been much
easier if it had been available in the window context, even though
eventually I planned to move the code to a worker.)


On Wed, Nov 16, 2011 at 7:47 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 15 Nov 2011 20:33:38 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
>>
>> So if I understand the proposal correctly:
>>
>> After .open has been called with async=false:
>> * setting .responseType to anything other than "" throws
>> InvalidAccessError
>> * setting .wirthCredentials to true throws InvalidAccessError
>>
>> Additionally, when calling .open with async=false, throw
>> InvalidAccessError if .responseType is set to anything other than ""
>> or .withCredentials is true.
>
> I implemented this in the specification, limited to XMLHttpRequest objects
> that have an associated XMLHttpRequest document. (So it still works in a
> Worker context.)
>
> http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/xhr-source.diff?r1=1.126;r2=1.127;f=h
>
> http://dev.w3.org/2006/webapi/XMLHttpRequest-2/
>
>
>> If that's the proposal, then this sounds good to me.
>
> Yes, though I missed withCredentials.
>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
>
Received on Wednesday, 16 November 2011 16:12:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT