Open itsrachelfish opened 8 years ago
I guess this could also happen if a document ready function is inside of a setTimeout
or setInterval
? Not sure why anyone would do that though...
You can detect the ready state by using https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState
Document ready never fires if it is called after the page is already loaded (for example if the script is loaded via require.js).
There are probably other cases where this could happen as well, like if the script file takes a long time to load and it's placed inside the
<body>
. Not sure, should be tested more thoroughly.