Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 893231 of TouchList

  • Revision slug: Web/API/TouchList
  • Revision title: TouchList
  • Revision id: 893231
  • Created:
  • Creator: MattBrubeck
  • Is current revision? No
  • Comment Remove deprecated TouchList::identifiedTouch method - https://github.com/w3c/touch-events/issues/20

Revision Content

{{ APIRef("Touch Events") }}

A TouchList represents a list of all of the points of contact with a touch surface; for example, if the user has three fingers on the screen (or trackpad), the corresponding TouchList would have one {{domxref("Touch")}} object for each finger, for a total of three entries.

Attributes

{{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. You can also simply reference the TouchList using array syntax (touchList[x]).

Example

See the example on the main Touch events article.

See also

  • Touch events
  • {{domxref("Touch")}}
  • {{domxref("TouchEvent")}}

Revision Source

<div>
<p>{{ APIRef("Touch Events") }}</p>
</div>

<p>A <code>TouchList</code> represents a list of all of the points of contact with a touch surface; for example, if the user has three fingers on the screen (or trackpad), the corresponding <code>TouchList</code> would have one {{domxref("Touch")}} object for each finger, for a total of three entries.</p>

<h2 id="Attributes">Attributes</h2>

<dl>
 <dt>{{domxref("TouchList.length")}} {{readonlyInline}}</dt>
 <dd>The number of {{domxref("Touch")}} objects in the <code>TouchList</code>.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<dl>
 <dt>{{domxref("TouchList.item()")}}</dt>
 <dd>Returns the {{domxref("Touch")}} object at the specified index in the list. You can also simply reference the <code>TouchList</code> using array syntax (<code>touchList[x]</code>).</dd>
</dl>

<h2 id="Example">Example</h2>

<p>See the <a href="/en-US/docs/DOM/Touch_events#Example" title="DOM/Touch events#Example">example on the main Touch events article</a>.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/DOM/Touch_events" title="DOM/Touch events">Touch events</a></li>
 <li>{{domxref("Touch")}}</li>
 <li>{{domxref("TouchEvent")}}</li>
</ul>
Revert to this revision