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?
(In case you miss the background, the API is a simple timeout attribute
(unsigned long) on the XMLHttpRequest object that defines the timeout to
be used when making a request. Whichever of the full response or the
timeout "runs" to completion first wins. If the timeout attribute is 0
(default value) the timeout API semantics do not affect the API and in
case of a UA-defined timeout NETWORK_ERR/error will be returned instead.)
--
Anne van Kesteren
http://annevankesteren.nl/