title: firefox extension. How to catch onload event?
body: <p>So..got scriptable extention for firefox.
  it's somelika a webspider, written in javascript.
  what i want to do:</p>
  
  <p>i want it load a page, them do some job, then go to another page (using an url from the loaded page). After the new page is loaded - the spider do the same job.</p>
  
  <p><strong>Algoritm is somelike this one:</strong></p>
  
  <ol>
  <li>wait till the page is loaded</li>
  <li>do some job</li>
  <li>choose a different url</li>
  <li>go to this url</li>
  <li>goto 1.</li>
  </ol>
  
  <p>in my main function i do this code:</p>
  
  <pre><code>gBrowser.addEventListener("DOMContentLoaded",haXahv8, false); 
  </code></pre>
  
  <p>and everything works fine till i go to another page...how can i reuse DOMContentLoaded event in my firefox extension?
  So, the question is: 
  is it possible to reuse load/DOMContentLoaded event in firefox extention for different pages? if yes then how?</p>
  
  <p>p.s.\earlier i was solving this prob,em with windows forms and webbrowser + c++...ooh, what the time it was...a dream! cause everything worked fine=)</p>