Navigator.maxTouchPoints

Return the maximum number of simultaneous touch contact points are supported by the current device.

Syntax

JavaScript
touchPoints = navigator.maxTouchPoints;

Example

JavaScript
if (navigator.maxTouchPoints > 1) {
  // browser supports multi-touch
}
Specification Status Comment
Pointer Events – Level 2
The definition of 'maxTouchPoints' in that specification.
Editor's Draft Non-stable version.
Pointer Events
The definition of 'maxTouchPoints' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 35[1] 29 (29)[2] 10 -ms
11
? Not supported
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
? Not supported

[1] This was implemented in bug 248918.

[2] Gecko supports this feature behind the preference dom.w3c_pointer_events.enabled, defaulting to false.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/navigator/maxtouchpoints

API DOM Property Reference