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
As easy as that.