vm-browserify icon indicating copy to clipboard operation
vm-browserify copied to clipboard

require('vm') like in node but for the browser

Results 14 vm-browserify issues
Sort by recently updated
recently updated
newest added

setTimeout, setInterval and other interval built in methods do not work, even if I expose them in context. ``` console.log('start'); setTimeout(()=> { console.log('hello timeout'); }, 2000); console.log('end'); ``` **output:** ```...

How do I import in Angular Typescript? Because require doesn't work in Angular Typescript.

Just spent today working on a sandboxing thing from a different angle before I found this. Turns out it's actually somewhat complementary! 1. The `iframe.contentWindow.eval` trick does a great job...

Error thrown in Firefox 65.0.1 but not chrome. https://github.com/browserify/vm-browserify/blob/master/index.js#L110

```js const vm = require("vm"); let script = new vm.Script("console.log('hello world')", { produceCachedData: true }); console.log(script.createCachedData()); ``` This fails because it's not implemented yet. We can run bytecode inside browser...

See #6 & #19. Re-using the iFrame boosted the performance significantly. The implementation: 1. caches the `iframe`. 2. makes sure the window context of the `iframe` is left clean after...

I have a project that makes many calls (some cases 100's) to `vm.runInNewContext`. Each call to `vm.runInNewContext` incurs the creation and [insertion of a new `iframe`](https://github.com/browserify/vm-browserify/blob/master/index.js#L60). This is not necessary,...

https://nodejs.org/api/vm.html#vm_vm_runincontext_code_contextifiedsandbox_options