[whatwg] XMLHttpRequest readyState==3

Christian Biesinger cbiesinger at web.de
Tue Sep 27 18:16:44 PDT 2005


David Flanagan wrote:
> If onreadystatechange is guaranteed to be called only once for 
> readyState 3, then I don't see much point in making responseText 
> available in this state.  It seems like it will encourage the use of 
> window.setTimeout() to poll the responseText property looking for new 
> stuff...

It looks like Gecko implements an "onprogress" event handler for this 
purpose, using an event object of type LSProgressEvent 
(http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725/load-save.html#LS-LSProgressEvent)

That event listener is called each time new data arrives.

Maybe that's an alternative to consider?





More information about the whatwg mailing list