mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
Merge pull request #336 from cslarson/whenEnvIsLoaded
don't wait for DOMContentLoaded if it's already fired
This commit is contained in:
commit
abecdf941a
@ -1,5 +1,5 @@
|
||||
var whenEnvIsLoaded = function(cb) {
|
||||
if (typeof document !== 'undefined' && document !== null) {
|
||||
if (typeof document !== 'undefined' && document !== null && !/comp|inter|loaded/.test(document.readyState)) {
|
||||
document.addEventListener('DOMContentLoaded', cb);
|
||||
} else {
|
||||
cb();
|
||||
|
Loading…
x
Reference in New Issue
Block a user