Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 3ac00f3

Browse files
committed
avoid using readyState interactive in IE.
1 parent 55470b2 commit 3ac00f3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/boot.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ function bootstrap() {
3030

3131
// Allow for asynchronous loading when minified
3232
// readyState 'interactive' is expected when loaded with 'async' or 'defer' attributes
33-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
33+
// note: use interactive state only when not on IE since it can become
34+
// interactive early (see https://github.com/mobify/mobifyjs/issues/136)
35+
if (document.readyState === 'complete' ||
36+
(document.readyState === 'interactive' && !window.attachEvent)) {
3437
bootstrap();
3538
} else {
3639
window.addEventListener('DOMContentLoaded', bootstrap);

0 commit comments

Comments
 (0)