Navigator.maxTouchPoints - Web API 接口参考 编辑
返回当前设备能够支持的最大同时触摸的点数。
语法
touchPoints = navigator.maxTouchPoints;
样例
if (navigator.maxTouchPoints > 1) {
// 浏览器支持多点触控
}
Specification | Status | Comment |
---|---|---|
Pointer Events – Level 2 maxTouchPoints | Working Draft | Non-stable version. |
Pointer Events maxTouchPoints | Recommendation | Initial definition. |
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 35[1] | 29 (29)[2] | 10 -ms 11 | ? | 未实现 |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | 35[1] | 29.0 (29)[2] | 10 -ms 11 | ? | 未实现 |
[1] This was implemented in bug 248918.
[2] Gecko supports this feature behind the preference dom.w3c_pointer_events.enabled
, defaulting to false
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论