add dom event listener. normalize ie and others
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src lint Jan 11, 2017
tests lint Jan 11, 2017
.editorconfig ok Nov 6, 2015
.gitignore ok Nov 6, 2015
.travis.yml
LICENSE.md Added LICENSE.md Jan 10, 2017
README.md add doc for remove Nov 6, 2015
index.js
package.json

README.md

add-dom-event-listener

add dom event listener. normalize ie and others. port from https://github.com/modulex/event-dom

NPM version build status Test coverage gemnasium deps node version npm download

examples

var addEventListener = require('add-dom-event-listener');
var handler = addEventListener(document.body, 'click', function(e){
  console.log(e.target); // works for ie

  console.log(e.nativeEvent); // native dom event
});
handler.remove(); // detach event listener