tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

scroll.html (1647B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8" />
      5    <meta name="viewport" content="width=device-width, initial-scale=0.5" />
      6    <style type="text/css">
      7      body {
      8        margin: 0;
      9        /* background contains one extra transparent.gif because we want trick the
     10      contentful paint detection; We want to make sure the background is loaded
     11      before the test starts so we always wait for the contentful paint timestamp
     12      to exist, however, gradient isn't considered as contentful per spec, so Gecko
     13      wouldn't generate a timestamp for it. Hence, we added a transparent gif
     14      to the image list to trick the detection. */
     15        background:
     16          url("/assets/www/transparent.gif"),
     17          linear-gradient(135deg, red, white);
     18      }
     19 
     20      #one {
     21        background-color: red;
     22        width: 200vw;
     23        height: 33vh;
     24      }
     25 
     26      #two {
     27        background-color: green;
     28        width: 200vw;
     29        height: 33vh;
     30      }
     31 
     32      #three {
     33        background-color: blue;
     34        width: 200vw;
     35        height: 33vh;
     36      }
     37 
     38      #four {
     39        background-color: purple;
     40        width: 200vw;
     41        height: 200vh;
     42      }
     43    </style>
     44  </head>
     45  <body>
     46    <div id="one"></div>
     47    <div id="two"></div>
     48    <div id="three"></div>
     49    <div id="four"></div>
     50    <script>
     51      document.getElementById("two").addEventListener("touchstart", e => {
     52        console.log("preventing default");
     53        e.preventDefault();
     54      });
     55 
     56      document.getElementById("three").addEventListener("touchstart", () => {
     57        console.log("not preventing default");
     58      });
     59    </script>
     60  </body>
     61 </html>