tor-browser

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

intersection-ratio-with-fractional-bounds-in-iframe.html (947B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <script src="/resources/testharness.js"></script>
      5    <script src="/resources/testharnessreport.js"></script>
      6    <style>
      7        body {
      8            margin: 0;
      9            padding: 0;
     10        }
     11        .iframe-container {
     12            width: 100%;
     13            border: 0;
     14            height: 200px;
     15        }
     16    </style>
     17 </head>
     18 <body>
     19 <script>
     20    const asyncTest = async_test("intersectionRatio in iframe should be 1 for totally visible target with fractional bounds");
     21    const onIframeObserved = (event) => {
     22        const ratio = event.detail.intersectionRatio;
     23        asyncTest.step(() => {
     24            assert_equals(ratio, 1);
     25        });
     26        asyncTest.done();
     27    };
     28    window.document.addEventListener("iframeObserved", onIframeObserved, false);
     29 </script>
     30 <iframe class="iframe-container" src="./resources/intersection-ratio-with-fractional-bounds-in-iframe-content.html"></iframe>
     31 </body>
     32 </html>