title: How can one simulate events triggered on load when adding javascript to a page through the browser's console?
body: <p>I'm currently working on a script to be placed on a 3rd-party site...in order to test it I'm opening the 3rd party's site and running the script in the browser's console (Chrome). Some code I need to executed on window.load(), but that code isn't being executed with this method of testing. I'm assuming it's because the code bound by load to the window is being bound after the load event has taken place, thus never being triggered. My question has two parts:</p>
  
  <ol>
  <li><p>Is the reason that window.load is not being triggered in fact because it's being added after the load event has been triggered? Or is this wrong and there is likely a problem elsewhere?</p></li>
  <li><p>How best can one simulate events triggered on load when appending javascript through the console like this?</p></li>
  </ol>