COLLECTED BY
Organization:
Internet Archive
The Internet Archive discovers and captures web pages through many different web crawls.
At any given time several distinct crawls are running, some for months, and some every day or longer.
View the web archive through the
Wayback Machine .
Web wide crawl with initial seedlist and crawler configuration from January 2012 using HQ software.
The Wayback Machine - https://web.archive.org/web/20120303023522/https://www.squarefree.com/shell/
A command-line interface for JavaScript and DOM.
Open the shell or get the Shell bookmarklet (Firefox only) .
Features
You can enter statements and expressions at the same prompt.
The result of each non-void statement or expression is shown.
User-defined variables.
User-defined functions.
function f() { return 5; }
JavaScript error messages are shown in red.
Previous statements and expressions are available through Up and Down arrow keys.
Tab completion.
Multiline input (Shift+Enter to insert a line break).
If the shell is opened using a bookmarklet, JavaScript typed into the shell runs in the context of the original window.
Works well in Firefox, mostly works in Opera 8 and in IE 6 for Windows.
Built-in functions
ans: the result of the previous expression.
print(expr): prints expr on its own line.
for(i = 0; i < 6; ++i) print( i * i)
pr(expr): prints and returns its input, so you can use it to print intermediate results in the middle of an expression.
function fact(n) { return n>0 ? pr( n*fact(n-1)) : 1 }
blink(node) or Alt+B : makes a node blink for a second.
props(obj) or Alt+P : lists the methods and fields of an object.
props( document.body)
In Firefox, props also shows which properties belong to the object itself and which belong to objects in its prototype chain.
Suggested uses
Test short bits of JavaScript, bookmarklets , or user scripts . (For longer bits of JavaScript, try the JavaScript development environment too.)
Explore DOM objects such as document.body using props (Alt+P ) to figure out what is possible.
Explore the DOM of a specific page using the bookmarklet version of the shell.
Modify the DOM of a specific page using the bookmarklet version of the shell.
Use the shell like you would use the home screen of a calculator such as a TI-83. Alt+M gives you easy access to math functions such as sin and pow.
About
The JavaScript shell was created by Jesse Ruderman . Ted Mielczarek added the tab completion feature in 1.1, Edward Lee added the multiline input feature in 1.2, and Jesper R�nn-Jensen fixed a few bugs for 1.4. Changelogs for some versions are available . The JavaScript Shell is GPL/LGPL/MPL tri-licensed.
Last modified October 30, 2005.