Configuration for filtering, formatting, and handling stacks.
error
: Fired when a script throws or a resource fails; ErrorEvent.error
may contain an Error
object when available.unhandledrejection
: Fired when a Promise rejects without a handler;
the event’s reason
may be an Error
or any value.The handler parses the stack via parseStack, applies filterStack when provided, and then either calls BrowserHookOptions.onStack or logs a formatted stack using formatStack.
Installs global browser hooks for
error
andunhandledrejection
.