Tim on September 23rd, 2008

OK, here’s the deal, as quick as I can put it, but with enough words that Google will correctly index this post and make this information easier to find for the next person who needs it.
Let’s say you’re developing a Firefox extension, and you need to look at the HTML of the page. You know […]

Continue reading about Javascript Events, the DOM, and Firefox/Gecko



Tim on September 15th, 2008

Detecting page loads is a useful ability. It’s easy enough to throw in a
gBrowser.addEventListener(”load”, function_name, true);
But, it causes extra events to get generated. There’s load events occurring in the browser that aren’t page loads. The trick to detecting real page loads (but not Back/Forward navigation when the page is still in memory — only page […]

Continue reading about Detecting page loads in a Firefox Extension

Tim on July 23rd, 2008

One hugely important thing in coding is debugging. Unfortunately, a lot of Javascript debugging gets done via alert() calls. This gets awkward quickly, with the alerts affecting timing, and just being annoying if you have to dump large amounts of data out.
Firebug is a great development tool, and has a really handy logging interface that […]

Continue reading about Firefox extension debugging

Tim on May 27th, 2008

OK. Because this was confusing the hell out of me, I had to post about figuring it out.
Let’s say you’re a developer writing a Mozilla Firefox Extension that searches for text on a page (or rather, in a browser window). If you have a button that has the following functionality attached onclick:
var webBrowserFind = getBrowser().selectedBrowser.webBrowserFind;
webBrowserFind.searchString […]

Continue reading about Finding text from a Firefox Extension