Current Firefox trunk nightlies will fire the onPageLoad function for not only documents, but xul:images (favicons in tabbrowser). If you only want to handle documents, ensure aEvent.originalTarget.nodeName == "#document" .
Sometimes this makes the input form reset at random and unusable.
MDN web docs: On page load
Sometimes this makes the input form reset at random and unusable.