title: strange double window.onerror behaviour
body: <p>I have two test files, <code>test1.html</code> and <code>test2.html</code>. I have <code>test1.html</code> as follows:</p>
  
  <pre><code>&lt;script&gt;
  window.onerror = function (message, file, lineNumber, columnNumber, error) {
      console.log(message, file, lineNumber, columnNumber, error);
  };
  
  asdf // Trigger error
  &lt;/script&gt;
  </code></pre>
  
  <p>which prints (as expected) </p>
  
  <pre><code>Uncaught ReferenceError: asdf is not defined file:///Users/justin/Desktop/test1.html 6 1 ReferenceError: asdf is not defined(…) 
  </code></pre>
  
  <p>I have <code>test2.html</code> as follows:</p>
  
  <pre><code>&lt;script src='test.js'&gt;&lt;/script&gt;
  </code></pre>
  
  <p>where <code>test.js</code> is:</p>
  
  <pre><code>window.onerror = function (message, file, lineNumber, columnNumber, error) {
      console.log(message, file, lineNumber, columnNumber, error);
  };
  
  asdf
  </code></pre>
  
  <p>which prints (not as expected)</p>
  
  <pre><code>Script error.  0 0 null
  </code></pre>
  
  <p>How can I catch the error information when my script is included using <code>src='test.js'</code> instead of inline?</p>