{{ APIRef("Touch Events") }}
The TouchList
interface represents a list of contact points with 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 {{domxref("Touch")}} object for each finger, for a total of three entries.
Properties
- {{domxref("TouchList.length")}} {{readonlyInline}}
- The number of {{domxref("Touch")}} objects in the
TouchList
.
Methods
- {{domxref("TouchList.item()")}}
- Returns the {{domxref("Touch")}} object at the specified index in the list.
Example
See the example on the main Touch events article.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Touch Events 2','#touchlist-interface')}} | {{Spec2('Touch Events 2')}} | Non-stable version. |
{{SpecName('Touch Events', '#touchlist-interface')}} | {{Spec2('Touch Events')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome("22.0")}} | {{CompatGeckoDesktop("18.0")}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatGeckoMobile("6.0")}} | {{CompatVersionUnknown}} | 11 | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
See also
- Touch events
- {{domxref("Document.createTouchList()")}}