New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

domassist

Package Overview
Dependencies
Maintainers
6
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domassist - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

48

dist/domassist.bundle.js

@@ -55,9 +55,29 @@ var domassist = (function (exports) {

return;
}
} // scrolling events need the passive listener attached
// to satisfy SEO scrolling measurements:
var data = {
cb: cb,
capture: capture
};
if (['touchstart', 'touchmove', 'wheel', 'mousewheel', 'scroll'].indexOf(event) !== -1) {
if (capture === false) {
capture = {
passive: true
};
}
if (capture === true) {
capture = {
passive: true,
capture: true
};
}
if (typeof capture === 'object') {
capture.passive = true;
}
} // _domassistevents keeps track of events we registered
// with 'domassist.on' so they can be deregistered by
// 'domassist.off' without affecting events registered
// by other libraries:
if (!window._domassistevents) {

@@ -67,3 +87,6 @@ window._domassistevents = {};

window._domassistevents["_" + event] = data;
window._domassistevents["_" + event] = {
cb: cb,
capture: capture
};
var el = find(selector);

@@ -232,12 +255,9 @@

if (!window._domassistevents) {
window._domassistevents = {};
}
if (!window._domassistevents || !window._domassistevents["_" + event]) {
return;
} // only disable events that were registered with domassist.on,
// don't de-register events that were registered by other libs:
var data = window._domassistevents["_" + event];
if (!data) {
return;
}
var el = find(selector);

@@ -244,0 +264,0 @@

@@ -52,9 +52,29 @@ function isWindow(obj) {

return;
}
} // scrolling events need the passive listener attached
// to satisfy SEO scrolling measurements:
var data = {
cb: cb,
capture: capture
};
if (['touchstart', 'touchmove', 'wheel', 'mousewheel', 'scroll'].indexOf(event) !== -1) {
if (capture === false) {
capture = {
passive: true
};
}
if (capture === true) {
capture = {
passive: true,
capture: true
};
}
if (typeof capture === 'object') {
capture.passive = true;
}
} // _domassistevents keeps track of events we registered
// with 'domassist.on' so they can be deregistered by
// 'domassist.off' without affecting events registered
// by other libraries:
if (!window._domassistevents) {

@@ -64,3 +84,6 @@ window._domassistevents = {};

window._domassistevents["_" + event] = data;
window._domassistevents["_" + event] = {
cb: cb,
capture: capture
};
var el = find(selector);

@@ -229,12 +252,9 @@

if (!window._domassistevents) {
window._domassistevents = {};
}
if (!window._domassistevents || !window._domassistevents["_" + event]) {
return;
} // only disable events that were registered with domassist.on,
// don't de-register events that were registered by other libs:
var data = window._domassistevents["_" + event];
if (!data) {
return;
}
var el = find(selector);

@@ -241,0 +261,0 @@

@@ -7,11 +7,9 @@ import find from './find';

}
if (!window._domassistevents) {
window._domassistevents = {};
if (!window._domassistevents || !window._domassistevents[`_${event}`]) {
return;
}
// only disable events that were registered with domassist.on,
// don't de-register events that were registered by other libs:
const data = window._domassistevents[`_${event}`];
if (!data) {
return;
}
const el = find(selector);

@@ -18,0 +16,0 @@ if (el.length) {

@@ -9,12 +9,28 @@ import find from './find';

const data = {
cb,
capture
};
// scrolling events need the passive listener attached
// to satisfy SEO scrolling measurements:
if (['touchstart', 'touchmove', 'wheel', 'mousewheel', 'scroll'].indexOf(event) !== -1) {
if (capture === false) {
capture = { passive: true };
}
if (capture === true) {
capture = { passive: true, capture: true };
}
if (typeof capture === 'object') {
capture.passive = true;
}
}
// _domassistevents keeps track of events we registered
// with 'domassist.on' so they can be deregistered by
// 'domassist.off' without affecting events registered
// by other libraries:
if (!window._domassistevents) {
window._domassistevents = {};
}
window._domassistevents[`_${event}`] = {
cb,
capture
};
window._domassistevents[`_${event}`] = data;
const el = find(selector);

@@ -21,0 +37,0 @@ if (el.length) {

{
"name": "domassist",
"version": "2.2.0",
"version": "2.3.0",
"description": "Various dom helpers",

@@ -5,0 +5,0 @@ "main": "domassist.js",

@@ -10,3 +10,5 @@ # domassist

`npm install domassist`
```sh
npm install domassist
```

@@ -13,0 +15,0 @@ ## Usage

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