Starting with Firefox 68, final events for
XMLHttpRequest started during page load will be deferred until an idle time is available or the loading is complete. These events include
readystatechange fired once the
readyState property becomes
Just like a similar change made to
setTimeout() with Firefox 66, this change aims at improving the performance of complex web applications like Gmail, but unexpected race conditions could occur if the initialization code is not designed properly.
Update: Firefox 69 has made a similar change to
fetch() as well.