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

Re: [XHR2] overrideMimeType in state UNSENT

From: Andrew Oakley <andrew@ado.is-a-geek.net>
Date: Wed, 9 Nov 2011 21:47:29 +0000
To: "Anne van Kesteren" <annevk@opera.com>
Cc: "Jonas Sicking" <jonas@sicking.cc>, "WebApps WG" <public-webapps@w3.org>
Message-ID: <20111109214729.4950ca21@ado-gentoo>
On Wed, 09 Nov 2011 09:39:27 -0800
"Anne van Kesteren" <annevk@opera.com> wrote:

> 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.
> >>
> >> 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.

Interestingly enough "override MIME type" and "override charset" are
not in the list of things that are reset by the open() call.

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

These things are supposed to be reset in the open() call... but at least
Firefox doesn't bother.  I've written a few tests for this but have not
(yet) run them on other browsers.


On a positive note I don't think I've spotted any other content
problems related to updating our XHR code to match a recent editors
draft of XHR2, but most of "new" features are unused or not yet
implemented in our browser.

Andrew Oakley
Received on Wednesday, 9 November 2011 21:46:56 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC