Skip to content
Offline-first Javascript interpreter web app.
Branch: master
Clone or download
Latest commit 9ffe806 Aug 22, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public Add PWA app manifest json file Aug 22, 2017
.gitignore Commenting and cleaning Jul 26, 2017
LICENSE Create LICENSE Aug 13, 2017
README.md Update README.md Aug 22, 2017
deploy.sh Add deploy script Aug 2, 2017

README.md

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/

You can’t perform that action at this time.