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

@yued/fastclick

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yued/fastclick - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

25

lib/fastclick.js

@@ -128,7 +128,24 @@ ;(function () {

var passiveListener = (function checkPassiveListener() {
//判断浏览器是否支持 {passive: true}
var supportsPassive = false;
try {
var opts = Object.defineProperty({}, 'passive', {
get: function () {
supportsPassive = true;
}
});
window.addEventListener('testPassiveListener', null, opts);
} catch (e) {
supportsPassive = false;
}
return supportsPassive;
}());
var listenerOptions = passiveListener ? { passive: false } : false;
layer.addEventListener('click', this.onClick, true);
layer.addEventListener('touchstart', this.onTouchStart, false);
layer.addEventListener('touchmove', this.onTouchMove, false);
layer.addEventListener('touchend', this.onTouchEnd, false);
layer.addEventListener('touchcancel', this.onTouchCancel, false);
layer.addEventListener('touchstart', this.onTouchStart, listenerOptions);
layer.addEventListener('touchmove', this.onTouchMove, listenerOptions);
layer.addEventListener('touchend', this.onTouchEnd, listenerOptions);
layer.addEventListener('touchcancel', this.onTouchCancel, listenerOptions);

@@ -135,0 +152,0 @@ // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)

2

package.json
{
"name": "@yued/fastclick",
"version": "1.0.7",
"version": "1.0.8",
"description": "Polyfill to remove click delays on browsers with touch UIs.",

@@ -5,0 +5,0 @@ "maintainers": [

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