W3C home > Mailing lists > Public > public-webapi@w3.org > February 2008

Re: Exceptions thrown by XMLHttpRequest.responseXML and XMLHttpRequest.responseText

From: Geoffrey Garen <ggaren@apple.com>
Date: Mon, 25 Feb 2008 10:53:51 -0800
Cc: public-webapi@w3.org
Message-Id: <0691AE7D-D0DB-4214-B792-2FA1BFF71A60@apple.com>
To: Anne van Kesteren <annevk@opera.com>

> On Fri, 15 Feb 2008 18:27:03 +0100, Geoffrey Garen  
> <ggaren@apple.com> wrote:
>> 3. This specification does not match any shipping version of  
>> Internet Explorer, which throws exceptions in some of these  
>> conditions, but not all. (The specifics here are a little weird, so  
>> I'll leave them out.)
>
> If you have the specifics available please share them. Testing a bit  
> further it seems my reverse engineering was a bit flaky,  
> responseText does throw for me, but responseXML does not:
>
>  http://tc.labs.opera.com/apis/XMLHttpRequest/responseXML/017.htm
>  http://tc.labs.opera.com/apis/XMLHttpRequest/responseText/004.htm

Yes, that's what I found, too.

>> Would you be willing to consider editing the XMLHttpRequest spec to  
>> match this behavior?
>
> Unless new information becomes available my plan is to make  
> responseText never return null. Decoding will always work, invalid  
> byte sequences are simply to be replaced with U+FFFD characters  
> (similar to other APIs). responseText will return the empty string  
> before readyState equals LOADING. responseXML will return null until  
> readyState equals DONE.


Sounds great!

Thanks,
Geoff
Received on Monday, 25 February 2008 18:54:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 25 February 2008 18:54:07 GMT