Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eventlistener

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventlistener

Super-simple wrapper around addEventListener and attachEvent (old IE). Does not handle different Event-objects.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
93K
increased by12.31%
Maintainers
1
Weekly downloads
 
Created
Source

eventlistener

Just a very simple wrapper around addEventListener with a stupid fallback to attachEvent. Does not handle the differences in Internet Exploreŕs events VS standard events.

Uses Universal Module Definition, so works with AMD, CommonJS or exposed as window.eventListener.

Build Status NPM

API

var eventListener = require('eventlistener');
function onLoad(evt) {};
eventListener.add(window, 'load', onLoad);
eventListener.remove(window, 'load', onLoad);

var el = document.getElementById('test');
eventListener.add(el, 'click', function (evt) {});

Keywords

FAQs

Package last updated on 16 Dec 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc