title: Javascript: Which parameters are there for the onerror event with image objects? How to get additional details on an error related to an image?
body: <p>I'm writing an application in JavaScript that should create a new image. Sometimes it fails. I was able to detect the times when it does by attaching an <code>image.onerror</code> event listener. Question is: How may I learn what error occured - what parameters does the error object for images bring? So far I only found out that</p>
  
  <pre><code>image.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
    console.log('Error: ' + errorMsg + ' Script: ' + url + ' Line: ' + lineNumber
    + ' Column: ' + column + ' StackTrace: ' +  errorObj);
  }
  </code></pre>
  
  <p>which I got from:
  <a href="https://stackoverflow.com/questions/2604976/javascript-how-to-display-script-errors-in-a-popup-alert">javascript: how to display script errors in a popup alert?</a></p>
  
  <p>returns <code>Error: [object Event] Script: undefined Line: undefined Column: undefined StackTrace: undefined</code> and in the error object I couldn't find anything related to message or error code.</p>