tor-browser

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

cross-origin-middle-frame.html (628B)


      1 <!DOCTYPE html>
      2 <!-- This document is used for the test `move-node-local-root.html` -->
      3 <script src="/common/get-host-info.sub.js"></script>
      4 
      5 <body>
      6 <script>
      7 (async function() {
      8  // This iframe will be cross-origin to the current document, but same-origin
      9  // with its grandparent, our direct parent.
     10  const iframe = document.createElement('iframe');
     11  iframe.src = new URL('resources/blank.html', get_host_info().HTTP_ORIGIN);
     12  const loadPromise = new Promise(resolve => iframe.onload = resolve);
     13  document.body.append(iframe);
     14  await loadPromise;
     15 
     16  parent.postMessage('grandchild loaded', '*');
     17 })();
     18 </script>
     19 </body>