johnnydepp
johnnydepp copied to clipboard
feature request: import() to return a promise
eg:
function imp(moduleJs) {
depp.define({moduleJs:moduleJs})
return new Promise(function (resolve, reject) {
depp.require(moduleJs, function () {
resolve('OK')
})
})//pro
}//()
Something like this would return a promise after a script is loaded (without having to name the script). Of course it may need a promise polyfill.