There seems to be no documentaion whatsoever for building Firefox extensions except for some good ol’ chaps who have put up brilliant tutorials on their weblogs (thanks guys). All I wanted to do was access the current windows DOM from within my extension. But for this trivial task I had to go to the extent of reading source code of various extensions )-:
One of the ways to access the DOM is as follows:
// Get the content of the currently displaying window
var win = window.content;
// Access the document within the window as follows
win.document.getElementById(’xyz’);
As easy as that.

#1 by Equazcion - January 25th, 2008 at 03:27
I know this is an old post but I wanted to thank you nonetheless. This answers a question I’ve been trying to answer for two days now. There’s absolutely no documentation on this anywhere, at least none that I could find. So, thanks
#2 by Donn Lee - May 6th, 2008 at 20:30
Ah, such a simple question, and here I finally found the answer. Just starting out in FF extension programming and after viewing the code of lots of fancy toolbars, I gave up and then searched/found this page instead. THANKS
#3 by Rocker - July 9th, 2008 at 17:07
Thanks a lot for the above post……. was searching for it for over 2 hrs….
#4 by Zach Wymer - November 2nd, 2008 at 07:57
I just wanted to say thank you too! It saved me a ton of time finding your post. This is the only link that the great Google provided me that actually helped. Thanks again!