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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user