Questions tagged [node-vm2]

vm2 is a cutting-edge Node.js environment specifically designed to securely execute untrusted code while restricting access to only approved Node.js built-in modules.

Virtual machines have encountered issues when attempting to utilize setTimeout within the browser with vm.runInNewContext

When running a JS script using the vm module in a browser, the following details are included: vm.runInNewContext(codeToEval, sandboxObject); Although interval methods like setTimeout and setInterval do not work, even when exposed in the sandboxObject cr ...