tor-browser

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

file_triggeringprincipal_subframe_nav.html (813B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head><meta charset="utf-8"></head>
      4 <body onload="checkResults()">
      5 <b>Sub Frame 2 Navigated</b><br/>
      6 
      7 <script type='application/javascript'>
      8  function checkResults() {
      9    // query the uri of the loadingPrincipal and the TriggeringPrincipal and pass
     10    // that information on to the parent for verification.
     11    var channel = SpecialPowers.wrap(window).docShell.currentDocumentChannel;
     12    var triggeringPrincipalURI = channel.loadInfo.triggeringPrincipal.asciiSpec;
     13    var loadingPrincipalURI = channel.loadInfo.loadingPrincipal.asciiSpec;
     14    var referrerURI = document.referrer;
     15    window.parent.parent.postMessage({triggeringPrincipalURI,
     16                                    loadingPrincipalURI,
     17                                    referrerURI}, "*");
     18  }
     19 </script>
     20 </body>
     21 </html>