- From: Sunava Dutta <sunavad@windows.microsoft.com>
- Date: Fri, 12 Sep 2008 14:13:40 -0700
- To: Jonas Sicking <jonas@sicking.cc>
- CC: Anne van Kesteren <annevk@opera.com>, WebApps WG <public-webapps@w3.org>, Gideon Cohn <gidco@windows.microsoft.com>, Zhenbin Xu <Zhenbin.Xu@microsoft.com>, IE8 Core AJAX SWAT Team <ieajax@microsoft.com>
Ah, so it sounds like timing out behaves very similarly to abort() > being > called? Does onreadystatechange fire since readystate changes to 0? And > does this happen before or after ontimeout is fired? > > I guess IE doesn't have an abort event on the XHR object (is this > correct?) so the relation between ontimeout and onabort is undefined as > far as the IE implementation goes. Onreadystate change is updated to 0 but does not fire for 0. We don’t have an abort event on XHR object (of course, abort exists) so onabort currently is undefined. > -----Original Message----- > From: Jonas Sicking [mailto:jonas@sicking.cc] > Sent: Thursday, September 11, 2008 8:32 PM > To: Sunava Dutta > Cc: Anne van Kesteren; WebApps WG; Gideon Cohn; Zhenbin Xu; IE8 Core > AJAX SWAT Team > Subject: Re: [xmlhttprequest2] timeout and JSON > > Sunava Dutta wrote: > > " I absolutely agree that it would rock if we could use > >> the MS implementation." > > > > Thanks Jonas. As always, appreciated. > > > > Answers to your question > >>> What happens if there is a timeout in that state? > >>> > >>> 1) .readystate is set to 0 > >>> .status is set to 0 > >>> .responseXML is set to null > >>> .responseText is set to "" > >>> 2) All properties are left as is. > >>> 3) Something else (Profit?) > > > > Essentially, timeout has the effect that is similar to 1). Infact, > design wise is intended to have the same effect although a few > superficial differences exist. > > What 1) seems to ask for is resetting the object, which is what IE8 > does. Readystate is set to 0, there are a few differences in IE's (8 > and legacy) support for the existing XHR syntax, and those are > reflected in the values of the properties when they are accessed in > readystate 0 and corresponding exceptions thrown. Any changes to a > future release of IE to bring those inline with the XHR spec would > remedy the differences. > > These are: > > When ontimeout fires: > > > > • Getting responseText throws an exception: “The data > necessary to complete this operation is not yet available” > > • Getting responseXML throws an exception: “Unspecified > error.” > > • Getting status throws an exception: “Unspecified error.” > > Ah, so it sounds like timing out behaves very similarly to abort() > being > called? Does onreadystatechange fire since readystate changes to 0? And > does this happen before or after ontimeout is fired? > > I guess IE doesn't have an abort event on the XHR object (is this > correct?) so the relation between ontimeout and onabort is undefined as > far as the IE implementation goes. > > / Jonas
Received on Friday, 12 September 2008 21:14:21 UTC