add-dom-event-listener
add dom event listener. normalize ie and others
Last updated 6 years ago by yiminghe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install add-dom-event-listener 
SYNC missed versions from official npm registry.

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

history

1.1.0

  • allow event options

Current Tags

  • 1.1.0                                ...           latest (6 years ago)

5 Versions

  • 1.1.0                                ...           6 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (5)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |