JavaScript global event mechanism
How to Catch Unhandled Javascript Errors Assign the window.onerror event to an event handler like: <script type=”text/javascript”> window.onerror = function(msg, url, line, col, error) { // Note that col & error are new to the HTML 5 spec and may not be // supported in every browser. It worked for me in Chrome. var extra … Read more