msMaxTouchPoints property
The maximum number of simultaneous touch contacts supported by the device.
This property is read-only.
![]() |
Syntax
| JavaScript |
|---|
numberPoints = object.msMaxTouchPoints |
Property values
Type: Integer
The maximum number of supported touch points.
Standards information
- Pointer Events, Section 8
Remarks
In Internet Explorer 10 on Windows 7, this property always returns a value of zero, regardless of the capabilities of the device.
In the case of devices with multiple digitizers (for example, multiple touchscreens), the value must be the maximum of the set of maximum supported contacts by each individual digitizer. For example, suppose a device has 3 touchscreens, which support 2, 5, and 10 simultaneous touch contacts, respectively. The value of maxTouchPoints is 10.
Examples
This example gets the number of touch points on a device. In Internet Explorer 10, it returns a zero on a mouse only computer, or 1 or more on a touch enabled computer and Windows 8. On earlier versions of Windows, msMaxTouchPoints returns undefined.
<!DOCTYPE html> <html> <head> <title>Touch points test</title> </head> <body> <div id="showme"></div> <script> var touchpoints = navigator.msMaxTouchPoints; if (touchpoints) { document.getElementById("showme").innerHTML = touchpoints.toString(); } else { document.getElementById("showme").innerHTML = "undefined"; } </script> </body> </html>
See also
Send comments about this topic to Microsoft
Build date: 6/14/2013

