tor-browser

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

hide-return-to-opener-button-manual.https.html (961B)


      1 <!DOCTYPE html>
      2 <title>Test that using documentPictureInPicture's disallowReturnToOpener
      3  parameter hides the return to opener button</title>
      4 <body>
      5  <p>
      6  This tests that a document picture-in-picture window opened with the `disallowReturnToOpener`
      7  parameter set to `true` does not display a button to return to the opener.
      8    <ol>
      9      <li>Click on the "Open document picture-in-picture window" button below.</li>
     10      <li>Check that it does not display that button.</li>
     11    </ol>
     12  </p>
     13  <input type="button" id="btnOpenPip" value="Open document picture-in-picture window" />
     14 <script>
     15 const btnOpenPip = document.getElementById('btnOpenPip');
     16 btnOpenPip.addEventListener('click', async () => {
     17  const pipWindow = await documentPictureInPicture.requestWindow({ disallowReturnToOpener: true });
     18  pipWindow.document.body.innerText = 'This document picture-in-picture window should not display a button to return to the opener';
     19 });
     20 </script>
     21 </body>