Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: content/test/data/page_with_touch_handler.html

Issue 1729373003: Implement touch events for site-isolation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html style="width: 100%; height: 100%">
3 <head>
4 <script>
5 function touchHandler(e, type) {
6 var touchResult = document.getElementById("last-touch-event");
7 touchResult.innerHTML = type;
8 }
9
10 function getLastTouchEvent() {
11 var touchResult = document.getElementById("last-touch-event");
12 return touchResult.innerHTML;
13 }
14
15 window.addEventListener('load', function(){ // on page load
16 document.body.addEventListener('touchstart',
17 function(e){
18 touchHandler(e, "touchstart");
19 }, false);
20
21 document.body.addEventListener('touchmove',
22 function(e){
23 touchHandler(e, "touchmove");
24 }, false);
25
26 document.body.addEventListener('touchend',
27 function(e){
28 touchHandler(e, "touchend");
29 }, false);
30 }, false);
31 </script>
32 </head>
33
34 <!-- Be sure to set 100% width/height so the test can determine an appropriate
35 screen region for targeting events. -->
36 <body style="width: 100%; height: 100%">
37 Page with Touch Handler
38 <div id="last-touch-event">noevent</div>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698