Safely attach a handler to window.onerror.
HTML JavaScript Makefile
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
History.md
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

on-error

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