PEP 0.4.0 发布,主要更新包括,更好地支持 module bundlers。详细内容如下:
Fixed module inclusion for node, browserify, webpack, etc. (#223, 6a9c6f0, 19122a3)
Added WIP build to CDN. (#230)
Check for standard properties before prefixed properties (#225, 1c93f07)
Fixed issue when mutation observers aren't supported. (#204, d928d44)
Added watch task to rebuild on source changes. (#236, 19e739e)
Improved
buttons
property forpointerdown
andpointerup
events. (#166, 0e3fb28)Replaced
touch-action
list with spec reference. (#210, 983f24c)Replaced PointerMap with potentially-sparse-array-based Map polyfill. (8c6d453)
下载地址: npm, bower (pepjs), the jQuery CDN, GitHub release
PEP(Pointer Events Polyfill) 是 Web 平台的统一事件系统。
鼠标事件和触摸事件在浏览器中是完全不同的,很难写出跨平台的应用。此应用就是为了解决这个问题,统一事件的处理,同时监听桌面的鼠标事件和移动端的触摸事件。
完全支持:Chrome 18+, Safari 6+, IE 10, Firefox 14+;部分支持 Opera 12-14。