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

Re: [XHR2] responseType / response / overrideMimeType proposal

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 30 Nov 2010 16:40:08 +0100
To: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vmzps6q664w2qv@anne-van-kesterens-macbook-pro.local>
On Mon, 29 Nov 2010 18:21:44 +0100, Anne van Kesteren <annevk@opera.com>  
> Before I write it out it would be nice to assess whether there is  
> consensus on this. From the current draft, asBlob, responseBlob, and  
> responseArrayBuffer are removed. response and responseType are added.


responseType takes the empty string, "text", "document", and "blob" as  
values. I left out "arraybuffer" awaiting TC39 verdict.

I waited with overrideMimeType changes. Can we actually start throwing for  
it? Anyone a good proposal for how it should work?

responseText throws when responseType is not the empty string or "text".  
responseXML throws when responseType is not the empty string or  
"document". response returns responseText by default and never throws.

When responseType is "blob" response always returns a Blob object,  
potentially empty if the response entity body is empty.

(I also removed followRedirects because its design was controversial.)

Feedback very much appreciated.

Anne van Kesteren
Received on Tuesday, 30 November 2010 15:40:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:14 UTC