No description, website, or topics provided.
JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
build built Dec 4, 2012
test tests pass Dec 1, 2012
.gitignore moved folder Nov 30, 2012 update readme Dec 1, 2012
grunt.js tests pass Dec 1, 2012
package.json added grunt Nov 30, 2012 fixed join comma issue Dec 4, 2012


Sandbox.js is a tiny library that runs code in a sandboxed environment, by sticking it in an iframe. It creates a global function called sandbox() which returns an iframe.


// Options passed as the first argument to sandbox. Defaults are listed.
  // iframe html
  html: '',
  // iframe css
  css: : '',
  // iframe js
  js: '',
  // whether to allow dialogs such as alert/confirm/prompts
  dialogs: true,
  external: {
    // array of external js libraries ie. jQuery
    js: [],
    // array of external js libraries ie. Bootstrap
    css: []

Coming soon

Detection of errors in scripts that run, useful for online IDEs. Nice callback system to avoid global iframe callback hell.