crossvent
Cross-platform browser event handling
The event handler API used by dominus.
Install
Using Bower
bower install -S crossvent
Using npm
npm install -S crossvent
API
The API exposes a few methods that let you deal with event handling in a consistent manner across browsers.
crossvent.add(el, type, fn, capturing?)
Adds an event listener fn
of type type
to DOM element el
.
crossvent;
crossvent.remove(el, type, fn, capturing?)
Removes an event listener fn
of type type
from DOM element el
.
crossvent;crossvent; { console;}
crossvent.fabricate(el, type, model?)
Creates a synthetic custom event of type type
and dispatches it on el
. You can provide a custom model
which will be accessible as e.detail
.
crossvent;crossvent; { console;}
License
MIT