JavaScript Shell

(*Update*: I’ve released 4.4beta, which is cross-browser compatible and should work on Internet Explorer, FireFox and Safari)

I have put version 4.2beta of my JavaScript Shell online here. JavaScript Shell is a web-app that facilitates testing JavaScript code by allowing you to enter a code snippet and execute this in the context of a page in your browser. It will display the “return” value of the executed code and the errors/exceptions thrown (if any). You can also easily change the URL of and add HTML tags to the page in which the script is executed. JSSh is of course limited by XSS protection in the browser and is therefore not able to run script in the context of pages in a different domain. (You can however, execute script in your own browser in any part of skypher.com; this is not an XSS issues because you can only “attack” yourself).

History: JSSh was originally developed in 2005 as a small, one HTML page tool that allowed me to play with JavaScript while I was still learning the finer details of the language and the DOM of each web-page in the browser. Over time, I added more and more features and it has slowly developed into a refined web-application for testing scripts during web-development. I use it quite frequently myself to do rapid development of scripts and to test anything I’m not sure of but need to know about JavaScript or the DOM. The full version, available on request, allows you to save and replay a number of commands in a URL and execute them by loading the URL in your browser. This can be useful if you want to show something to others; you can send them a URL, which they can click to see your script in action without having to create a file on a web-page to store your script in. Because of the obvious XSS issues that this feature would incure on the skypher.com domain, I have disabled this feature in the version I put on-line. I’m looking at hosting JSSh on a separate domain, so I can avoid this problem and turn the feature back on.

Bugs: Please report any issues to me.

Leave a Comment

*

*