touchstart.html (1161B)
1 <html> 2 <head> 3 <meta charset="utf-8" /> 4 <meta name="viewport" content="width=device-width, initial-scale=0.5" /> 5 <style type="text/css"> 6 body { 7 margin: 0; 8 /* background contains one extra transparent.gif because we want trick the 9 contentful paint detection; We want to make sure the background is loaded 10 before the test starts so we always wait for the contentful paint timestamp 11 to exist, however, gradient isn't considered as contentful per spec, so Gecko 12 wouldn't generate a timestamp for it. Hence, we added a transparent gif 13 to the image list to trick the detection. */ 14 background: 15 url("/assets/www/transparent.gif"), 16 linear-gradient(135deg, red, white); 17 } 18 19 #one { 20 background-color: red; 21 width: 200%; 22 height: 100vh; 23 } 24 #two { 25 background-color: blue; 26 width: 200%; 27 height: 800vh; 28 } 29 </style> 30 </head> 31 <body> 32 <div id="one"></div> 33 <div id="two"></div> 34 <script> 35 document.getElementById("two").addEventListener("touchstart", () => {}); 36 </script> 37 </body> 38 </html>