tor-browser

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

iframe-trying-to-navigate-its-child.html (556B)


      1 <!DOCTYPE html>
      2 <iframe src="data:text/html,If this message appears, then this frame has not been navigated by its parent."></iframe>
      3 <script>
      4 window.onload = function() {
      5  try {
      6    document.querySelector("iframe").contentWindow.location.href = "data:text/html,\u003c!DOCTYPE html\u003e\u003cp\u003eIf this message appears, then this frame has been navigated by its parent.\u003c/p\u003e\u003cscript\u003eparent.parent.postMessage('can navigate', '*');\u003c/script\u003e";
      7  } catch(e) {
      8    parent.postMessage("can not navigate", "*");
      9  }
     10 }
     11 </script>