Nothing.
installErrorCapture(); // call once per context, before the app runs
export function installErrorCapture(): void {
if (captureInstalled) return;
if (typeof self === 'undefined' || typeof self.addEventListener !== 'function') return;
captureInstalled = true;
self.addEventListener('error', (event: ErrorEvent) => {
const described = event.error ? describeError(event.error) : { message: event.message };
void recordError({ source: 'window', ...described });
});
self.addEventListener('unhandledrejection', (event: PromiseRejectionEvent) => {
void recordError({ source: 'unhandledrejection', ...describeError(event.reason) });
});
}
Registers global
errorandunhandledrejectionlisteners that push captured exceptions into the ring buffer. Idempotent, and safe in both window and service-worker contexts (both exposeselfwithaddEventListener).