@appsignal/plugin-window-events plugin binds to the window.onerror and window.onunhandledrejection event handlers to catch any errors that are otherwise not caught elsewhere in your code.
Installation
Add the@appsignal/plugin-window-events and @appsignal/javascript packages to your package.json file and run yarn install/npm install.
You can also add these packages to your package.json on the command line:
Usage
plugin options
The plugin can be initialized with the following options:
| Param | Type | Description |
|---|---|---|
| onerror | Boolean | (optional) A boolean value representing whether the plugin should bind to the window.onerror handler. Defaults to true. |
| onunhandledrejection | Boolean | (optional) A boolean value representing whether the plugin should bind to the window.onunhandledrejection handler. Defaults to true. |