W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2008

RE: <Further LC Followup from IE> RE: Potential bugs identified in XHR LC Test Suite

From: Zhenbin Xu <Zhenbin.Xu@microsoft.com>
Date: Sun, 15 Jun 2008 22:05:45 -0700
To: Jonas Sicking <jonas@sicking.cc>, Sunava Dutta <sunavad@windows.microsoft.com>
CC: Web API public <public-webapi@w3.org>, IE8 Core AJAX SWAT Team <ieajax@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <72F767ADE7C63540BE69CD2722A41F440E99754C08@NA-EXMSG-W601.wingroup.windeploy.ntdev.microsoft.com>

The issue of return "null or an exception" is simply a compromise here. IE would throw an exception for state violations. Accessing responseXML before open() is a state violation so it would trigger exception. Other browsers may return null in such situation.  In order to accommodate all browsers, the spec would have to be rewritten in some way.

We would certainly love to have the spec change to "MUST throw INVALID_STATE_ERR exception", which is consistent with other INVALID_STATE_ERR cases.  For instance, the spec says if send() is called before OPENED, it should trigger  INVALID_STATE_ERR exception. Another example is that user agent must raise INVALID_STATE_ERR if "status" is not available. responseText and responseXML are the outlier in the spec.


Thanks!
Zhenbin


-----Original Message-----
From: Jonas Sicking [mailto:jonas@sicking.cc]
Sent: Thursday, June 12, 2008 11:20 AM
To: Sunava Dutta
Cc: Web API public; IE8 Core AJAX SWAT Team; public-webapps@w3.org
Subject: Re: <Further LC Followup from IE> RE: Potential bugs identified in XHR LC Test Suite

> _http://tc.labs.opera.com/apis/XMLHttpRequest/responseXML/001.htm_
>
> The test is expecting us to return NULL in case open() has not been
> called.  We throw an exception in IE.   I'd pre fer if the spec says
> *"*MUST return null OR an exception*"* otherwise I fear sites today will
> be broken.

How would that help sites that expect an exception, since it would still
be conforming for the UA to return null? If anything, your proposal
seems to make it harder for sites to code against the spec.

/ Jonas
Received on Monday, 16 June 2008 20:12:56 GMT

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