5 <meta name=
"viewport" content=
"width=device-width,initial-scale=1.0">
6 <title>Touch Action Test Page
</title>
10 Events are logged when tests touch this div.
12 <div id=
"events">events:
</div>
14 We need some padding here so that the page is large enough to test swipe
17 <div id=
"bottom">This is the bottom of the page.
</div>
19 events
= document
.getElementById('events');
20 var eventTypes
= ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
21 var eventListener = function(evt
) {
22 events
.innerHTML
+= ' ' + evt
.type
;
25 var target
= document
.getElementById('target');
26 for (var i
= 0; i
< eventTypes
.length
; i
++) {
27 target
.addEventListener(eventTypes
[i
], eventListener
);
30 var padding
= document
.getElementById('padding');
31 padding
.style
.border
= 'solid';
32 padding
.style
.height
= window
.screen
.height
* 2 + 'px';
33 padding
.style
.width
= window
.screen
.width
* 2 + 'px';