Fix proper triggering of module fallback
We might be in the "interactive" readyState, which means that DOMContentLoaded has already fired and we'll hang.
This commit is contained in:
parent
9eaea86234
commit
800abf1277
|
@ -1269,7 +1269,7 @@ if (typeof document != 'undefined' && document.getElementsByTagName) {
|
|||
};
|
||||
|
||||
// simple DOM ready
|
||||
if (document.readyState === 'complete')
|
||||
if (document.readyState !== 'loading')
|
||||
setTimeout(ready);
|
||||
else
|
||||
document.addEventListener('DOMContentLoaded', ready, false);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -66,7 +66,7 @@ if (typeof document != 'undefined' && document.getElementsByTagName) {
|
|||
}
|
||||
|
||||
// simple DOM ready
|
||||
if (document.readyState === 'complete')
|
||||
if (document.readyState !== 'loading')
|
||||
setTimeout(ready);
|
||||
else
|
||||
document.addEventListener('DOMContentLoaded', ready, false);
|
||||
|
|
Loading…
Reference in New Issue