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

crossvent

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crossvent - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

5

CHANGELOG.md

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

# v1.3.0 Fire Bug
- Use `fireEvent` and `createEventObject` when their modern counterparts are missing
- Use `setCapture` and `releaseCapture` when modern event handling methods are missing
# v1.2.0 Flag The Bug

@@ -2,0 +7,0 @@

2

package.json
{
"name": "crossvent",
"description": "Cross-platform browser event handling",
"version": "1.2.0",
"version": "1.3.0",
"homepage": "https://github.com/bevacqua/crossvent",

@@ -6,0 +6,0 @@ "author": {

'use strict';
var doc = document;
var addEvent = addEventEasy;

@@ -17,3 +18,6 @@ var removeEvent = removeEventEasy;

function addEventHard (el, type, fn, capturing) {
return el.attachEvent('on' + type, wrap(el, type, fn), capturing);
if (capturing) {
el.setCapture();
}
return el.attachEvent('on' + type, wrap(el, type, fn));
}

@@ -26,9 +30,18 @@

function removeEventHard (el, type, fn, capturing) {
return el.detachEvent('on' + type, unwrap(el, type, fn), capturing);
if (capturing) {
el.releaseCapture();
}
return el.detachEvent('on' + type, unwrap(el, type, fn));
}
function fabricateEvent (el, type) {
var e = document.createEvent('Event');
e.initEvent(type, true, true);
el.dispatchEvent(e);
var e;
if (doc.createEvent) {
e = doc.createEvent('Event');
e.initEvent(type, true, true);
el.dispatchEvent(e);
} else if (doc.createEventObject) {
e = doc.createEventObject();
el.fireEvent('on' + type, e);
}
}

@@ -35,0 +48,0 @@

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