window addeventlistener error not working
Can someone explain why this code does not work in the safari browser?
window.addEventListener('error', function(event) {
console.log('error event was triggered.')
})
throw new Error('Error')
Other event types work correctly. The problem only with error