Add timer api to extensions sandbox (#6604)

This commit is contained in:
John Doe authored and GitHub committed 2021-03-06 17:41:11 +01:00
1 parent 0d60ae2f58
commit 0ca834cc70
1 file changed
+6
+6
View File
@@ -152,6 +152,12 @@ function loadModuleFromText(moduleCode) {
require: require,
module: {},
console,
setTimeout,
clearTimeout,
setInterval,
clearInterval,
setImmediate,
clearImmediate,
};
vm.runInNewContext(moduleCode, sandbox, moduleFakePath);
return sandbox.module.exports;