Return the maximum number of simultaneous touch contact points are supported by the current device.
SyntaxEdit
touchPoints = navigator.maxTouchPoints;
ExampleEdit
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 compatibilityEdit
[1] This was implemented in bug 248918.
[2] Gecko supports this feature behind the preference dom.w3c_pointer_events.enabled
, defaulting to false
.