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

8 lines
183 B
Plaintext

var whenEnvIsLoaded = function(cb) {
if (typeof document !== 'undefined' && document !== null) {
document.addEventListener('DOMContentLoaded', cb);
} else {
cb();
}
}