mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 14:01:20 +00:00
Add timer api to extensions sandbox (#6604)
This commit is contained in:
1 parent
0d60ae2f58
commit
0ca834cc70
1 file changed
+6
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user