add-dom-event-listener

add dom event listener. normalize ie and others

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
add-dom-event-listener
1.1.04 years ago7 years agoMinified + gzip package size for add-dom-event-listener in KB

Readme

add-dom-event-listener
add dom event listener. normalize ie and others. port from https://github.com/modulex/event-dom
!NPM versionnpm-imagenpm-url !build statustravis-imagetravis-url !Test coveragecoveralls-imagecoveralls-url !gemnasium depsgemnasium-imagegemnasium-url !node versionnode-imagenode-url !npm downloaddownload-imagedownload-url

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