- From: Anne van Kesteren <annevk@opera.com>
- Date: Wed, 18 Aug 2010 00:37:07 +0200
- To: "Michael Nordman" <michaeln@google.com>
- Cc: "Web Applications Working Group WG" <public-webapps@w3.org>, "Eric Uhrhane" <ericu@google.com>, "Jonas Sicking" <jonas@sicking.cc>, "Darin Fisher" <darin@chromium.org>, "James Robinson" <jamesr@google.com>, "Thomas Broyer" <t.broyer@gmail.com>
On Wed, 18 Aug 2010 00:24:56 +0200, Michael Nordman <michaeln@google.com> wrote: > Blob attribute responseBlob; > // Returns a blob the contains the response body. > // Only valid to access when asBlob is true and when the request is in > // a terminal state. Throws INVALID_STATE_ERR if accessed at an > // invalid time. I suppose when asBlob is true and the state is not DONE it should simply return null like responseXML does for consistency. But when asBlob is false it should throw. See for responseXML: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-responsexml-attribute >> Currently for network errors (i.e. not "errors" such as HTTP 410) >> everything will return their default value. Is there a good reason to do >> this differently for responseBlob? > > Ok... so is the "default value" for responseBlob an empty blob when > asBlob is true and the attribute is accessed while the XHR object is in > a terminal error or aborted state? Just looking to clarify whether the > accessor should throw the invalid state error or return normally in > these terminal states. If we go with null above it should be null here too. Returning null is probably also better if we decide we want to expose the Blob as streaming entity at some point. I.e. while the state is LOADING. -- Anne van Kesteren http://annevankesteren.nl/
Received on Tuesday, 17 August 2010 22:37:48 UTC