Socket
Socket
Sign inDemoInstall

add-dom-event-listener

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    add-dom-event-listener

add dom event listener. normalize ie and others


Version published
Weekly downloads
641K
increased by3.72%
Maintainers
1
Install size
21.2 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 15 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc