embark-area-51/lib/contracts/code_templates/define-when-env-loaded.js.ejs

8 lines
183 B
Plaintext
Raw Normal View History

2017-10-14 00:01:35 +00:00
var whenEnvIsLoaded = function(cb) {
if (typeof document !== 'undefined' && document !== null) {
document.addEventListener('DOMContentLoaded', cb);
} else {
cb();
}
}