How to catch an "ReferenceError" with "onerror" - Stack Overflow
https://stackoverflow.com/questions/56549403/how-to-catch-an-referenceerror-with-onerror
WebJun 11, 2019 · <script type="text/javascript"> window.onerror = function(msg, url, line, col, error) { alert("ERROR"); }; window.onload = async function() { test. }; </script> I can see in the javascript log: "ReferenceError: test is not defined". But why does the onerror alert not work? javascript. error-handling. referenceerror. asked Jun 11, 2019 at 18:02.
DA: 42 PA: 86 MOZ Rank: 81