The TouchList
interface represents a list of contact points on a touch surface. For example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding TouchList
object would have one Touch
object for each finger, for a total of three entries.
Properties
TouchList.length
Read only- The number of
Touch
objects in theTouchList
.
Methods
TouchList.identifiedTouch()
- Returns the first
Touch
item in the list whose identifier matches a specified value. TouchList.item()
- Returns the
Touch
object at the specified index in the list.
Example
See the example on the main Touch events article.
Specifications
Specification | Status | Comment |
---|---|---|
Touch Events – Level 2 | Draft | Non-stable version. |
Touch Events | Recommendation | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
TouchList | Chrome Full support 18 | Edge Full support ≤18 | Firefox
Full support
52
| IE No support No | Opera Full support 15 | Safari No support No | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 6 | Opera Android Full support 14 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
identifiedTouch | Chrome ? | Edge ? | Firefox ? | IE No support No | Opera ? | Safari No support No | WebView Android ? | Chrome Android ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
item | Chrome Full support 18 | Edge Full support ≤18 | Firefox
Full support
52
| IE No support No | Opera Full support 15 | Safari No support No | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 6 | Opera Android Full support 14 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
length | Chrome Full support 18 | Edge Full support ≤18 | Firefox
Full support
52
| IE No support No | Opera Full support 15 | Safari No support No | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 6 | Opera Android Full support 14 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Non-standard. Expect poor cross-browser support.
- Non-standard. Expect poor cross-browser support.
- Deprecated. Not for use in new websites.
- Deprecated. Not for use in new websites.