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 940575 of TouchList

  • Revision slug: Web/API/TouchList
  • Revision title: TouchList
  • Revision id: 940575
  • Created:
  • Creator: AFBarstow
  • Is current revision? No
  • Comment s/Attributes/Properties/

Revision Content

{{ APIRef("Touch Events") }}

A TouchList object 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.

See also

  • Touch events
  • {{domxref("Touch")}}
  • {{domxref("TouchEvent")}}
  • {{domxref("Document.createTouchList()")}}

Revision Source

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

<p>A <code>TouchList</code> object 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 <code>TouchList</code> object would have one {{domxref("Touch")}} object for each finger, for a total of three entries.</p>

<h2 id="Properties">Properties</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.</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="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Touch Events 2','#touchlist-interface')}}</td>
   <td>{{Spec2('Touch Events 2')}}</td>
   <td>Non-stable version.</td>
  </tr>
  <tr>
   <td>{{SpecName('Touch Events', '#touchlist-interface')}}</td>
   <td>{{Spec2('Touch Events')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<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>
 <li>{{domxref("Document.createTouchList()")}}</li>
</ul>
Revert to this revision