The js sandbox console is a javascript playground designed to enhance demos and homepages for javascript libraries, plugins and scripts, giving visitors an easy and chilled-out way to test-drive the functionality - without whacking open their Firebug / Dev Tools console.
→ Check out the project homepage for a live demo, features, installation guide and more info!
by joss
- Adds
setValue
method, to set the value inside the sandbox
- Adds an
iframe
setting on the Sandbox Model that, when active, creates a hiddeniframe
and evaluates all commands inside its 'sandboxed' scope - this blocks access to globals and prevents users screwing up the DOM. - Adds a script loader method,
sandbox.model.load
, that injects a script into the page (or theiframe
), making it available for the user. - Adds a special command,
:load
, available from the sandbox command line, that load's a script into the global context (most useful iniframe
mode. Usage eg::load http://code.jquery.com/jquery-1.6.4.js
- Added very basic stringification for objects. If
JSON.stringify(obj)
works, it prints the result, otherwise it'sobj.toString()
like a loser. Soon try to integrate a custom solution like in jsconsole.com, that includes circular structures, native/browser objects, and object methods.
- Mirrored gh-pages and master, much easier than trying to maintain both separately.
- Added view.toEscaped method to escape HTML strings so that they can be safely templated into the output
- First release