tor-browser

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

scroll-button-elementFromPoint.html (980B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Overflow: elementFromPoint for ::scroll-button is scroller</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
      5 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <style>
      9  body {
     10    margin: 0;
     11  }
     12 
     13  #scroller {
     14    margin-top: 100px;
     15    width: 600px;
     16    height: 300px;
     17    overflow: auto;
     18    white-space: nowrap;
     19  }
     20 
     21  #scroller div {
     22    display: inline-block;
     23    width: 600px;
     24    height: 200px;
     25  }
     26 
     27  #scroller::scroll-button(left) {
     28    position: absolute;
     29    top: 0;
     30    left: 0;
     31    content: "";
     32    width: 100px;
     33    height: 20px;
     34    display: inline-block;
     35  }
     36 </style>
     37 <div id="scroller">
     38  <div></div>
     39  <div></div>
     40 </div>
     41 <script>
     42  test(() => {
     43    assert_equals(document.elementFromPoint(10, 10), scroller);
     44  });
     45 </script>