title: How can we listen for errors that do not trigger window.onerror?
body: <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onerror">https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onerror</a> states:</p>
  
  <blockquote>
    <p>Note that some/many error events do not trigger window.onerror, you have to listen for them specifically.</p>
  </blockquote>
  
  <ol>
  <li>Could you please provide some examples of errors that do not trigger <code>window.onerror</code>? I know <code>SyntaxError</code> is one of them.</li>
  <li>Could you please provide a small code example to show how we can listen for such errors? Can we listen for <code>SyntaxError</code> too?</li>
  </ol>