Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Safely attach a handler to window.onerror.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
History.md
Makefile
Readme.md
component.json
index.js

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

Something went wrong with that request. Please try again.