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
{{ message }}
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
/complete|interactive/.test(document.readyState) and document.onreadystatechange are not reliable as DOM ready tests. All versions of IE can have interactive state before the DOM is fully loaded. Also, readystatechange can fire before the DOM is fully loaded.
I have written an exploratory test which is sufficient to confirm this bug.
Unlike DOMContentLoaded and readystatechange, window.onload is supported on all recent and almost all older browsers. When mobify.js is able to run on older browsers then a window.onload solution won't need to be updated.
Because there is no content, images or styles to download and / or render, I would assume that window.onload is not significantly later than any other event that could be used.
This relates to a bug in the v2.0 branch.
/complete|interactive/.test(document.readyState)
anddocument.onreadystatechange
are not reliable as DOM ready tests. All versions of IE can haveinteractive
state before the DOM is fully loaded. Also,readystatechange
can fire before the DOM is fully loaded.I have written an exploratory test which is sufficient to confirm this bug.
https://gist.github.com/shogun70/5388420
The jQuery project also has a bug report -
document ready is fired too early on IE 9/10
and a "fix" -
sometimes IE10 and lower have document.readyState == "interactive" way too early
domReady also has a report and fix -
Add Guard for invalid readyState in IE9 and IE10
The text was updated successfully, but these errors were encountered: