js catch errors on listeners code example
Example: js catch errors on listeners
// If you would like to access errors thrown from event handlers,
// you may listen to the error event on window.
// It will be emitted for all uncaught errors in the current JavaScript VM:
window.addEventListener('error', function(event) {
console.log("Got an uncaught error: ", event.error)
})