You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why script injection starts after timeout? It delays downloading of scripts, sometimes significantly. There is almost no delay in Chrome, but in FF and IE9 (that's what I've tested so far) timeout event fired after DOMContentLoaded and thus they have notable lag before starting to download scripts. I tried to delete setTimeut and it removes the lag while the code is still passed all tests.
So, the question is: what for do we use setTimeout? Comment says that timeout "fires after window 'load' event", but it's neither the truth or explanation why.
If you need, I can do some deeper investigation on this.
The text was updated successfully, but these errors were encountered:
The intention was to start the download after the DOMContentLoaded event fires but if the behavior is different depending on the browser then we should remove it.
Can you confirm that using setTimeout executes code before DOMContentLoaded event fires in Chrome but after in FF and IE9?
Why script injection starts after timeout? It delays downloading of scripts, sometimes significantly. There is almost no delay in Chrome, but in FF and IE9 (that's what I've tested so far) timeout event fired after DOMContentLoaded and thus they have notable lag before starting to download scripts. I tried to delete setTimeut and it removes the lag while the code is still passed all tests.
So, the question is: what for do we use
setTimeout
? Comment says that timeout "fires after window 'load' event", but it's neither the truth or explanation why.If you need, I can do some deeper investigation on this.
The text was updated successfully, but these errors were encountered: