Socket
Book a DemoInstallSign in
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.

latest
npmnpm
Version
0.0.1
Version published
Weekly downloads
86K
5.69%
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

browser

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