https://github.com/segmentio/on-error
Safely attach a handler to window.onerror.
https://github.com/segmentio/on-error
paused
Last synced: 9 months ago
JSON representation
Safely attach a handler to window.onerror.
- Host: GitHub
- URL: https://github.com/segmentio/on-error
- Owner: segmentio
- Created: 2013-08-28T08:21:45.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T19:11:30.000Z (almost 3 years ago)
- Last Synced: 2025-08-07T10:19:40.223Z (11 months ago)
- Topics: paused
- Language: HTML
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 37
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# on-error
> **Note**
> Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.
Safely attach a handler to `window.onerror` regardless of existing handlers.
It will also rebind to `window.onerror` if another party clobbers it.
## Installation
$ component install segmentio/on-error
## API
### onError(fn)
Call `fn` when an error is thrown on the page.
## License
MIT