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

dom-event-listener

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-event-listener - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

24

lib/index.js

@@ -5,3 +5,3 @@ 'use strict';

forEach = require('lodash/forEach'),
clone = require('lodash/clone'),
clone = require('lodash/cloneDeep'),
merge = require('lodash/merge'),

@@ -71,8 +71,22 @@

function onEvent(event) {
var newEvent = merge({}, event);
var newEvent = {};
newEvent.currentTarget = element;
newEvent.target = newEvent.target || newEvent.srcElement;
newEvent.preventDefault = newEvent.preventDefault || preventDefault;
for (var property in event) {
newEvent[property] = event[property];
}
if (event.preventDefault) {
newEvent.preventDefault = event.preventDefault.bind(event);
} else {
newEvent.preventDefault = preventDefault;
}
if (!newEvent.target) {
newEvent.target = newEvent.srcElement;
}
if (!newEvent.currentTarget) {
newEvent.currentTarget = element;
}
handleEvent(newEvent, bubbling);

@@ -79,0 +93,0 @@ }

{
"name": "dom-event-listener",
"version": "1.0.4",
"version": "1.0.5",
"description": "Cross browser event listeners",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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