Javascript – Why doesn't the `window.onerror` getter trigger when an uncaught error occurs?
I want to interceptor the window.onerror which user defined, and get the error parameters info to do some analysis. The following is a part of the interceptor code: const userError = window.onerror; delete window.onerror; const errorFn = (...args) => {…