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

wheel-indicator

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wheel-indicator - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

24

lib/wheel-indicator.js
/**
* Generates event when user makes new movement (like a swipe on a touchscreen).
* @version 1.2.0
* @version 1.2.2
* @link https://github.com/Promo/wheel-indicator

@@ -206,3 +206,3 @@ * @license MIT

if(elem.addEventListener) {
elem.addEventListener(type, handler, false);
elem.addEventListener(type, handler, isPassiveSupported() ? { passive: false } : false);
} else if (elem.attachEvent) {

@@ -215,3 +215,3 @@ elem.attachEvent('on' + type, handler);

if (elem.removeEventListener) {
elem.removeEventListener(type, handler, false);
elem.removeEventListener(type, handler, isPassiveSupported() ? { passive: false } : false);
} else if (elem.detachEvent) {

@@ -247,1 +247,19 @@ elem.detachEvent('on'+ type, handler);

}
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners
function isPassiveSupported() {
var passiveSupported = false;
try {
var options = Object.defineProperty({}, "passive", {
get: function() {
passiveSupported = true;
}
});
window.addEventListener("test", null, options);
window.removeEventListener("test", null, options);
} catch(err) {}
return passiveSupported;
}

2

package.json
{
"name": "wheel-indicator",
"version": "1.2.1",
"version": "1.2.2",
"description": "normalizes an inertial mousewheel",

@@ -5,0 +5,0 @@ "main": "lib/wheel-indicator",

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