The current problem is with the way how Firebug handles end of the
XHR. The current implementation replaces "onreadystatechange" callback
of each XHR with own callback and executes the original by calling
previousCallback.handleEvent(event). Unfortunately this doesn't work
due to the bug above.
Notice that the "onreadystatechange" is used to only handle the state
== 4 (the end of the request).
I would like to commit a workaround that fixes this (by not using the
onreadystatechange) but following listeners instead:
xhr.addEventListener("load", function() {}, true);
xhr.addEventListener("error", function() {}, true);
As far as I understood the logic the "load" event is *equivalent* to
onReadyStateChange (state==4) and the only difference is that "load"
is not called when an error occurs while transferring the file. So,
Firebug must use yet the "error" event listener.
Is this correct?
Are there any other cases when "load" event differs from
"onreadystatechange" callback?
i.e. "load" isn't fired while "onreadystatechange" callback is called?
Honza