i try using window.attachEvent (or addEventListener) to capture js errors
my callback function gets only one event parameter
my question is: how do i get line number and source file of the error from this event?
the alternative usage window.onerror=callback; works
but an event listener has other benefits thus im giving it a try
You won’t get line number and source file from an error in IE except via
window.onerror. In Firefox,Errorobjects havelineNumberandfileNameproperties, so if you’ve caught an error usingtry/catchyou can use these properties.