- From: Jonas Sicking <jonas@sicking.cc>
- Date: Tue, 10 Nov 2009 09:23:04 -0800
- To: Anne van Kesteren <annevk@opera.com>
- Cc: WebApps WG <public-webapps@w3.org>
On Tue, Nov 10, 2009 at 5:22 PM, Anne van Kesteren <annevk@opera.com> wrote: > I was looking at defining the timeout feature. For consistency with "abort > error" and "network error" it would make sense to introduce a TIMEOUT_ERR > for synchronous requests, but Internet Explorer is probably not doing this > (at least not per documentation). > > For consistency with "abort error" and "network error" it would make sense > to dispatch a readystatechange event. Per comments from Sunava Internet > Explorer does not do this. Similarly it would make sense to move the state > of the object to 4 rather than 0. Again, per Sunava Internet Explorer does > not do this. > > Personally I think we want to dispatch the readystatechange event, we want > to switch the state of the object to 4, we want to dispatch a loadend event > after the timeout event, we do not want to dispatch an abort event (this was > suggested before), and we want to throw a TIMEOUT_ERR exception (code 23 or > 24, depending on whether we want to reserve 23 for v2-datagrid) for the > synchronous request case rather than dispatching events. > > I also think we want to dispatch the timeout event to the > XMLHttpRequestUpload object (in the asynchronous case) for consistency. > > Thoughts? Are all of these comments for synchronous XHR only? I agree with most of your comments. Though I think we should fire an "abort" event since Progress Events spec says to fire one of abort/error/load, and abort seems to fit the bill the best. Or are you suggesting that Progress Events should say that one of abort/error/load/timeout is always fired? I agree that firing readystatechange seems like the most consistent thing to do. I agree that firing timeout (and IMHO abort) on the XHRUpload object unless upload has already finished. In general, I think essentially behaving as if a "timeout" event was fired, and then abort() is called is how we should behave. / Jonas
Received on Tuesday, 10 November 2009 17:23:56 UTC