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

Re: [XHR2] overrideMimeType in state UNSENT

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 09 Nov 2011 09:39:27 -0800
To: "Andrew Oakley" <andrew@ado.is-a-geek.net>, "Jonas Sicking" <jonas@sicking.cc>
Cc: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.v4own1c864w2qv@annevk-macbookpro.local>
On Wed, 09 Nov 2011 09:30:32 -0800, Jonas Sicking <jonas@sicking.cc> wrote:
> On Wednesday, November 9, 2011, Andrew Oakley <andrew@ado.is-a-geek.net>
> wrote:
>> It seems fairly common to call overrideMimeType before open(), but
>> should throw an InvalidStateError according to current XHR2 editors  
>> draft.
>>
>> If you search (Google) for overrideMimeType a significant number of
>> first page results show calling of overrideMimeType before the open
>> call, so I imagine this will become increasingly common as people
>> copy+paste.
>>
>> I don't think this is a particularly problematic thing to allow so can
>> we please update the spec to allow this?
>
> And for the sake of consistency and ease of use, we should allow setting
> .responseType at that time too.

Currently open() resets a bunch of a state. If we are going to allow  
setting state before open() is invoked we should rethink how open() ought  
to work. I.e. what it resets and what should be kept as before.

If we change this it makes sense to change withCredentials and timeout too  
I would say. What about setRequestHeader()?


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Wednesday, 9 November 2011 17:40:17 GMT

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