add event listeners in IE and ... everywhere else
Add or remove event listeners in IE8+ / modern browsers.
var events =var el = documentevents// OR:var add =
This package exports
addEventListener (with a polyfill for
removeEventListener are available as properties on the export.
Adds an event listener to an element. On IE<9, uses
attachEvent. WARNING: If
true and this function is run on IE8, an exception will be thrown (since event capturing
cannot be emulated.)
Remove an event listener from an element.