tor-browser

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

browser_realm_key_promise_frame.html (494B)


      1 <script type="text/javascript">
      2 // Access to the top-level window property before getting access.
      3 // This will create an entry in cross-origin realm map.
      4 try {
      5  window.top.P;
      6 } catch (e) {}
      7 
      8 document.domain = "mochi.test";
      9 
     10 // Ensure that frame's Object.prototype is accessible from top-level frame
     11 // when getting incumbent global object inside Promise handling.
     12 window.top.P.then(v => {
     13  if (v == 10) {
     14    window.top.document.getElementById("result").textContent = "OK";
     15  }
     16 });
     17 </script>