tor-browser

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

iframe-with-square-sends-entry.html (772B)


      1 <!DOCType html>
      2 <html>
      3 <style>
      4 body {
      5  margin: 0;
      6 }
      7 </style>
      8 <body>
      9 <script>
     10  const observer = new PerformanceObserver(entryList => {
     11    top.postMessage({
     12      'length' : entryList.getEntries().length,
     13      'entryType' : entryList.getEntries()[0].entryType,
     14      'rect' : entryList.getEntries()[0].intersectionRect,
     15      'naturalWidth' : entryList.getEntries()[0].naturalWidth,
     16      'naturalHeight' : entryList.getEntries()[0].naturalHeight,
     17      'id': entryList.getEntries()[0].id,
     18      // Elements cannot be cloned, so just send the element ID.
     19      'elementId' : entryList.getEntries()[0].element.id,
     20    }, '*');
     21  });
     22  observer.observe({entryTypes: ['element']});
     23 </script>
     24 <img src=square100.png id=iframe_img_id elementtiming=my_image/>
     25 </body>
     26 </html>