eventlistener
Super-simple wrapper around addEventListener and attachEvent (old IE). Does not handle different Event-objects.
Last updated 11 years ago by gregersrygg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install eventlistener 
SYNC missed versions from official npm registry.

eventlistener

Just a very simple wrapper around addEventListener with a stupid fallback to attachEvent. Does not handle the differences in Internet Exploreŕs events VS standard events.

Uses Universal Module Definition, so works with AMD, CommonJS or exposed as window.eventListener.

Build Status NPM

API

var eventListener = require('eventlistener');
function onLoad(evt) {};
eventListener.add(window, 'load', onLoad);
eventListener.remove(window, 'load', onLoad);

var el = document.getElementById('test');
eventListener.add(el, 'click', function (evt) {});

Current Tags

  • 0.0.1                                ...           latest (11 years ago)

1 Versions

  • 0.0.1                                ...           11 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE