OLD | NEW |
(Empty) | |
| 1 <sky> |
| 2 <div id="log">Ready</div> |
| 3 <script> |
| 4 function logTouchEvent(evt) { |
| 5 var message = "type=" + event.type; |
| 6 if (evt.touches && evt.touches.length > 0) |
| 7 message += " x=" + evt.touches[0].clientX + " y=" + evt.touches[0].clientY; |
| 8 document.getElementById("log").textContent = message; |
| 9 } |
| 10 |
| 11 document.documentElement.addEventListener("touchstart", logTouchEvent); |
| 12 document.documentElement.addEventListener("touchmove", logTouchEvent); |
| 13 document.documentElement.addEventListener("touchend", logTouchEvent); |
| 14 document.documentElement.addEventListener("touchcancel", logTouchEvent); |
| 15 </script> |
| 16 </sky> |
OLD | NEW |