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

Commit

Permalink
avoid using readyState interactive in IE.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Oct 3, 2013
1 parent 55470b2 commit 3ac00f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ function bootstrap() {

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

0 comments on commit 3ac00f3

Please sign in to comment.