tor-browser

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

doc_layoutHelpers_getBoxQuads2-c-and-e.html (583B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <script>
      4 'use strict';
      5 window.onmessage = () => {
      6  const innerNode = window.document.getElementById("inner-node");
      7  const wrappedNode = SpecialPowers.wrap(innerNode);
      8  const wrappedQuads = wrappedNode.getBoxQuadsFromWindowOrigin();
      9  const quad = SpecialPowers.unwrap(wrappedQuads[0]);
     10 
     11  window.parent.postMessage({ quad }, "*");
     12 };
     13 </script>
     14 <style>
     15  body {
     16    margin: 0;
     17    padding: 0;
     18    background: pink;
     19  }
     20  div {
     21    margin: 50px;
     22    width: 50px;
     23    height: 50px;
     24    background: green;
     25  }
     26 </style>
     27 <div id="inner-node"></div>