orders in XmlHttpRequest's readyState change and onreadystatechange event handler execution?

334 Views Asked by At

I have a question on temporal behavior regarding XmlHttpRequest objects.

Is it guarantee that a readyState value update and the corresponding onreadystatechange event handler invocation are executed consecutively ?

I checked out the JavaScript specification on W3C (http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405), however the temporal behavior of readyState is not clearly specified to answer the question.

I ran a small example code to check this issue, and found that at least in Firefox, no other event handler can be scheduled between the readyState update and the onreadystatechange event handler executions.

0

There are 0 best solutions below