W3cubDocs

/Web APIs

TouchList

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.

Note: This interface was an attempt to create an unmodifiable list and only continues to be supported to not break code that's already using it. Modern APIs use types that wrap around ECMAScript array types instead, so you can treat them like ECMAScript arrays, and at the same time impose additional semantics on their usage (such as making their items read-only).

Instance properties

TouchList.length Read only

The number of Touch objects in the TouchList.

Instance methods

TouchList.item()

Returns the Touch object at the specified index in the list.

Example

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
TouchList 18 ≤18
52This interface is only exposed if a touch input device is detected.
18–24Removed in bug 888304 due to web compatibility issues.
No 15 No 4.4 18 6 14 2 1.0
item 18 ≤18
52This interface is only exposed if a touch input device is detected.
18–24Removed in bug 888304 due to web compatibility issues.
No 15 No 4.4 18 6 14 2 1.0
length 18 ≤18
52This interface is only exposed if a touch input device is detected.
18–24Removed in bug 888304 due to web compatibility issues.
No 15 No 4.4 18 6 14 2 1.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TouchList