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

  • Revision slug: Web/API/TouchList
  • Revision title: TouchList
  • Revision id: 954965
  • Created:
  • Creator: AFBarstow
  • Is current revision? No
  • Comment Update sidebar

Revision Content

{{ 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

Revision Source

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

<p>The <code>TouchList</code> 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 <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="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome("22.0")}}</td>
   <td>{{CompatGeckoDesktop("18.0")}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Android Webview</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoMobile("6.0")}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>11</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

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