attach-dom-events
Utility to attach multiple dom events to an element. Uses dom-events.
var attach =
Usage
attach(element[, events])
attach.on(element[, events])
Attaches the dictionary of events
to element
, using the keys as event names for addEventListener
.
The main exported method is the same as on
.
attach.off(element[, events])
Detaches all the given events.
attach.once(element[, events])
Attaches all the given events using once
instead of on
.
License
MIT, see LICENSE.md for details.