JavaScript code execution context for the browser and wrapper around node vm module


Simple execution context for node and the browser. In node it just creates a new context and runInContext in that context and in the browser it creates an iframe and hangs on to it until destroy is called.

sandbox is an object that would be shallowly copied into the execution context.

Evaluates code and returns result.

Does nothing in node but removes iframe in browser.