I\'m developing a Firefox extension and have the following code:
function initialize() {
// For accessing browser window from sidebar code.
var mainWind
From https://developer.mozilla.org/en/Code_snippets/On_page_load
Current Firefox trunk nightlies will fire the onPageLoad function for not only documents, but
xul:image
s (favicons in tabbrowser). If you only want to handle documents, ensureaEvent.originalTarget.nodeName == "#document"
If you're still seeing extraneous 'load' events firing, you may want to inspect the event target to figure out what's being loaded, and use similar logic to avoid calling your extension's logic in certain specific cases.