tor-browser

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

elementFromPoint-float-in-relative.html (750B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint" />
      3 <link rel="help" href="https://crbug.com/1146797">
      4 <link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <body>
      8  <div>
      9    <span style="position: relative">
     10      <span>
     11        <a id="target" href="#" style="float: left">link</a>
     12      </span>
     13    </span>
     14  </div>
     15 <script>
     16 test(() => {
     17  let target = document.getElementById('target');
     18  let bounds = target.getBoundingClientRect();
     19  let result = document.elementFromPoint(bounds.left + 1, bounds.top + 1);
     20  assert_equals(result, target);
     21 });
     22 </script>
     23 </body>