el

event-listener

Simple function for addEventListener() vs. addEvent()

Showing:

Popularity

Downloads/wk

76

GitHub Stars

3

Maintenance

Last Commit

6yrs ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

0.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

event-listener

Build Status

Simple function for addEventListener() vs addEvent() if you need to support old IE.

Install

npm install event-listener

Usage

var listen = require('event-listener')

// Returns an object with a .remove() method
var scrollListener = listen(window, 'scroll', function(e) {
  // ...
})

// Later...

scrollListener.remove()

// Multiple event names may be provided
var dimensionListener = listen(window, 'resize orientationchange', fn)

MIT Licensed

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100