JSFiddle - React, Tailwind, and code Playground
by kazu69
JavaScript
window.addEventListener('error', function() {
throw "Error";
alert(1);
}, false);
document.addEventListener('click', function() {
alert('click');
})
setTimeout(function() {
window.addEventListener('error', function(e) {
alert(e.message);
}, false);
}, 100);
setTimeout(function() {
100 / hoge;
}, 1000);
setTimeout(function() {
alert('another method execute!');
}, 2000);