Skip to content

Commit

Permalink
change to allowReturnToOpener
Browse files Browse the repository at this point in the history
  • Loading branch information
steimelchrome committed Mar 13, 2024
1 parent 1d110a6 commit efcdf48
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ interface DocumentPictureInPicture : EventTarget {
dictionary DocumentPictureInPictureOptions {
[EnforceRange] unsigned long long width = 0;
[EnforceRange] unsigned long long height = 0;
boolean allowReturnToTab = true;
boolean allowReturnToOpener = true;
};

[Exposed=Window, SecureContext]
Expand Down Expand Up @@ -219,18 +219,18 @@ problems.
window such that the distance between the top and bottom edges of the
viewport are |options|["{{DocumentPictureInPictureOptions/height}}"]
pixels.
14. If |options|["{{DocumentPictureInPictureOptions/allowReturnToTab}}"] exists
14. If |options|["{{DocumentPictureInPictureOptions/allowReturnToOpener}}"] exists
and is <code>false</code>, the user agent should not display UI affordances
on the picture-in-picture window that allow the user to return to the
opener window.

<p class="note">
For both video and document picture-in-picture, user agents often display a
button for the user to return to the original tab and close the
picture-in-picture window. While this actino makes sense in most cases
button for the user to return to the original page and close the
picture-in-picture window. While this action makes sense in most cases
(especially for a video picture-in-picture window that returns the video to the
main document), it does not always make sense for document picture-in-picture
windows. {{DocumentPictureInPictureOptions/allowReturnToTab}} is a hint to the
windows. {{DocumentPictureInPictureOptions/allowReturnToOpener}} is a hint to the
user agent from the website as to whether that action makes sense for their
particular document picture-in-picture experience.
</p>
Expand Down Expand Up @@ -657,16 +657,16 @@ content in question inside the PiP window:
}
</pre>

## Hide return-to-tab button ## {#example-hide-return-to-tab}
## Hide return-to-opener button ## {#example-hide-return-to-opener}

While user agents often display a button on their video and document
picture-in-picture windows to return to the original tab and close the window,
picture-in-picture windows to return to the opener and close the window,
this button doesn't always make sense for some websites' document
picture-in-picture experience. Use the
{{DocumentPictureInPictureOptions/allowReturnToTab}} option to hide the button.
{{DocumentPictureInPictureOptions/allowReturnToOpener}} option to hide the button.

<pre class="lang-javascript">
documentPictureInPicture.requestWindow({ allowReturnToTab: false });
documentPictureInPicture.requestWindow({ allowReturnToOpener: false });
</pre>

# Acknowledgments # {#acknowledgments}
Expand Down

0 comments on commit efcdf48

Please sign in to comment.