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

component-event

Package Overview
Dependencies
Maintainers
29
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-event - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0

2

component.json

@@ -5,3 +5,3 @@ {

"description": "Event binding component",
"version": "0.1.4",
"version": "0.2.0",
"keywords": [

@@ -8,0 +8,0 @@ "browser",

@@ -0,2 +1,6 @@

0.2.0 / 2016-09-22
==================
* [[`f1c2c3d2b1`](https://github.com/component/component-event/commit/f1c2c3d2b1)] - make requireable without `window` (Nathan Rajlich)
0.1.4 / 2014-05-27

@@ -3,0 +7,0 @@ ==================

@@ -1,5 +0,9 @@

var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
prefix = bind !== 'addEventListener' ? 'on' : '';
var bind, unbind, prefix;
function detect () {
bind = window.addEventListener ? 'addEventListener' : 'attachEvent';
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent';
prefix = bind !== 'addEventListener' ? 'on' : '';
}
/**

@@ -17,2 +21,3 @@ * Bind `el` event `type` to `fn`.

exports.bind = function(el, type, fn, capture){
if (!bind) detect();
el[bind](prefix + type, fn, capture || false);

@@ -34,4 +39,5 @@ return fn;

exports.unbind = function(el, type, fn, capture){
if (!unbind) detect();
el[unbind](prefix + type, fn, capture || false);
return fn;
};
};
{
"name": "component-event",
"description": "Event binding component",
"version": "0.1.4",
"version": "0.2.0",
"keywords": [

@@ -6,0 +6,0 @@ "browser",

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