add-dom-event-listener
v1.1.0
Published
add dom event listener. normalize ie and others
Downloads
2,833,901
Readme
add-dom-event-listener
add dom event listener. normalize ie and others. port from https://github.com/modulex/event-dom
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