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

anima-yocto-event

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anima-yocto-event - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

HISTORY.md

@@ -14,1 +14,5 @@ # History

`remove` delegate,undelegate,bind,unbind,live,die
## 1.0.2
`new` 事件监听阶段,增加animaClick判断以及touch逻辑

2

package.json
{
"name": "anima-yocto-event",
"version": "1.0.1",
"version": "1.0.2",
"description": "the event from yocto",

@@ -5,0 +5,0 @@ "keywords": [],

var $ = require('anima-yocto-core');
// Event Module
var _zid = 1, undefined,

@@ -54,2 +53,16 @@ slice = Array.prototype.slice,

handler.proxy = function(e){
//Android下如果同时存在tap逻辑并且事件类型为click,阻止浏览器自己触发的点击事件
if (navigator.userAgent.toLowerCase().indexOf('android') > -1 && $.gestures && $.gestures.tap && handler.e === 'click' && !e.animaClick) {
if (e.stopImmediatePropagation) {
e.stopImmediatePropagation();
} else {
e.propagationStopped = true;
}
e.stopPropagation()
e.preventDefault()
return false
}
e = compatible(e)

@@ -64,4 +77,10 @@ if (e.isImmediatePropagationStopped()) return

set.push(handler)
if ('addEventListener' in element)
if ('addEventListener' in element){
// 自定义手势逻辑
if($.gestures && $.gestures.list && $.gestures.list[handler.e]){
$.gestures.list[handler.e](element);
}
element.addEventListener(handler.e, handler.proxy, eventCapture(handler, capture))
}
})

@@ -152,7 +171,2 @@ }

// 自定义手势逻辑
if($.gestures && $.gestures.list && $.gestures.list[event]){
$.gestures.list[event]($this);
}
return $this.each(function(_, element){

@@ -159,0 +173,0 @@ if (one) autoRemove = function(e){

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