Neil's News

JS-Interpreter

5 December 2013

Ever wanted to execute arbitrary JavaScript in JavaScript? JS-Interpreter offers several advantages over simply calling eval():

  • This sandbox allows one to execute untrusted code in complete safety. The code has no access to the DOM unless you create an API.
  • Code can be executed step by step, making infinite loops a non-issue.
  • Step by step execution also allows real-time execution of multiple isolated threads without web workers (hello MSIE 9).
  • Eliminating eval() allows one to create Chrome Extensions and Chrome Apps.

Enter JavaScript code below, then click Parse. To execute, either click Step repeatedly, or click Run once. Open your browser's console for errors.


Read the JS-Interpreter documentation.

Get the source code.

< Previous | Next >

 
-------------------------------------
Legal yada yada: My views do not necessarily represent those of my employer or my goldfish.