Mozilla Web Developer’s documentation

I wasted a lot of time last night searching for JavaScript documentation. My friend Scott Flinn was nice enough to give me these pointers regarding DOM and general Web work:

This is much better than flying blind, but I wish I had something more like the Java API documentation.

BTW if you don’t know Scott Flinn, you should. He is probably the best technical resource I ever met. And I don’t mean “technical resource” in an insulting way. He simply understands hands-on technology very deeply. He is also a pessimist like myself, so we do get along, I think.

Here’s some advice from Scott:

If you just want core JavaScript stuff, then you use Rhino or
SpiderMonkey (the Mozilla implementations in Java and C++ respectively).
I swear by Rhino. You just drop js.jar into your extensions directory
and add this simple script to your path:

#!/bin/sh
java org.mozilla.javascript.tools.shell.Main

Then ‘rhino’ will give you a command line prompt that will evaluate
arbitrary JavaScript expressions. The nice part is that you have
a bridge to Java, so you can do things like:

js> sb = new java.lang.StringBuffer( ‘This’ );
This
js> sb.append( ‘ works!’ );
This works!
js> sb
This works!

What I did was to download Rhino, open the archive, and type “java -jar js.jar”. It brought up a console. System.out doesn’t work, but you can print using the “print” command. (Update:Obviously, you have to do java.lang.System.out…)

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax