Imagine I have an array of XMLHttpRequest objects:
var scriptArray = []; // (filled with XMLHttpRequest objects all with the "readyState" unknown
And every XMLHttpRequest object has the following "load" event attached:
function handleLoadEvent(event) {
// ignore status, I'll check for 404's, etc... in production
// ignore eval, I'll use the <script> method in production
window.eval($event.currentTarget.responseText);
// log that this object is loaded
window.console.log('My script ran!');
for(var i = 0; i < scriptArray.length; i++) {
if(scriptArray[i].readyState === 4) {
window.console.log('Is it possible that another XMLHttpRequest object "readyState" is "4" but it\'s "load" event has not fired?');
}
}
}
Is it possible that another XMLHttpRequest object "readyState" is "4" but it's "load" event has not fired?
In actual practice, this is difficult to test since objects load very quickly.