Tuesday, January 23, 2007

view-source, javascript, about:config

{

A while back Aaron offhandedly shows me a slick trick with Firefox when I'm complaining about how it doesn't show namespaces on xml documents: you can use view-source as a protocol to look a website's source code. If you've got Firefox, check it out.

I've been making my way through the 5th edition of the Rhino book and Flanagan shows another technique of using your address bar with a protocol. You can type something like:

javascript:alert("Hello World");

into your address bar and just like that you've got a little play pen for your javascript. You can also extend it to include html that you'd like to render, for example:

javascript:alert("Hello There");<p>Hello</p>

Of course do not forget about:config as a way to configure Firefox. Any more of these goodies?

}

2 comments:

AJ said...

Firebug is an absolute game changer for Javascript development:

http://www.getfirebug.com/

David Seruyange said...

You're right on that - I'd used it a while back when I was first making proper.