-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathindex.html
executable file
·31 lines (28 loc) · 1.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
feature_name: Input Device Capabilities
chrome_version: 47
feature_id: 5681847971348480
---
<h3>Background</h3>
<p>
The <a href="http://rbyers.github.io/InputDevice/index.html">Input Device Capabilities API</a>
provides information about the capabilities of the physical device responsible for generating an
event.
</p>
<p>
This sample illustrates using <code>UIEvent.sourceCapabilities</code> to obtain the capabilities
of the device that triggered the event, and then checks the <code>firesTouchEvents</code> property
to determine whether that device can create a
<a href="http://www.w3.org/TR/touch-events/#touchevent-interface"><code>TouchEvent</code></a>.
Developers should note that this doesn't necessarily mean the device is a touch screen. For
example, stylus and mouse devices typically generate <code>TouchEvent</code>s on mobile browsers.
</p>
<p>
The <a href="http://www.html5rocks.com/en/mobile/touchandmouse/#toc-mostimp"><em>Touch and Mouse</em></a>
article provides some background on why that knowledge is important for developers.
</p>
{% capture initial_output_content %}
<button id="press-me">Press Me!</button>
{% endcapture %}
{% include output_helper.html initial_output_content=initial_output_content %}
{% include js_snippet.html filename='demo.js' %}