Wondering what’s next for npm?Check out our public roadmap! »

    add-dom-event-listener

    1.1.0 • Public • Published

    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

    Keywords

    Install

    npm i add-dom-event-listener

    DownloadsWeekly Downloads

    698,913

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    14.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar