()
| 64 | } |
| 65 | |
| 66 | function registerGlobalErrorHandler() { |
| 67 | if (typeof document !== 'undefined') { |
| 68 | globalThis.addEventListener('unhandledrejection', handler); |
| 69 | globalThis.addEventListener('error', handler); |
| 70 | |
| 71 | return function () { |
| 72 | globalThis.removeEventListener('unhandledrejection', handler); |
| 73 | globalThis.removeEventListener('error', handler); |
| 74 | }; |
| 75 | } |
| 76 | |
| 77 | return null; |
| 78 | } |
| 79 | |
| 80 | function unregisterRegisterGlobalErrorHandler(fn) { |
| 81 | if (typeof fn === 'function') { |
no test coverage detected