title: Is is possible to add an EventListener that performs some action when a console error appears?
body: <p>I'm looking for something similar to what this guy was trying to do: <a href="https://stackoverflow.com/questions/10257301/where-to-read-console-messages-from-background-js-in-a-chrome-extension">Where to read console messages from background.js in a Chrome extension?</a> but I can't find an answer on whether or not there is a way to listen and log console errors as they come in.</p>
  
  <p>I don't need the content as the above commenter does, just to have some action performed if an error message appears on the console.</p>
  
  <p>I'm trying to do something like this:</p>
  
  <pre><code>addEventListener("error", function(){ 
      ...some function...
  }); 
  </code></pre>
  
  <p>where the function is triggered every time an error appears, but I can't seem to find anything that will do this in the Chrome developer documentation.</p>
  
  <p>Anyone know of a solution?</p>