All Projects → triestpa → OpenJS-Sandbox

triestpa / OpenJS-Sandbox

Licence: MIT license
Offline-first Javascript interpreter web app.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
shell
77523 projects

Open JS Sandbox

Welcome to Open JS Sandbox, an open-source in-browser Javascript code-runner.

A live version of the sandbox is here - https://code.patricktriest.com

Sandboxed iframe execution

This web app is completely self-contained, it requires no server component or API to function. It runs the code within a sandboxed iframe, intercepts console log statements, and sends those logs to the main app.

Note that the code runs within the browser, so watch out for infinite loops, which will freeze the browser tab.

Multiple Editors

On opening the sandbox, two editor options are presented: Monaco and Ace. The resources for the chosen editor will be download once it is selected. Both editors are open-source, and very high quality. Ace is more lightweight(120kb), whereas Monaco(the same editor as used in VSCode) is heavier (1.4mb) and more feature rich.

Offline First

This web app is also configured as Progressive Web App (PWA), so on compatible browsers (i.e. not Safari) it will work completely offline.

Embeddable

This web app can be easily embedded in any other page using an iframe, to provide a live JS sandbox within any webpage. For an example, see here - https://blog.patricktriest.com/what-is-async-await-why-should-you-care/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].