Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update in Document Picture-In-Picture API #35918

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions files/en-us/web/api/documentpictureinpicture/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@ It is accessed via the {{domxref("Window.documentPictureInPicture")}} property.

## Instance properties

_Inherits properties from its parent, {{DOMxRef("EventTarget")}}._

- {{domxref("DocumentPictureInPicture.window", "window")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : Returns a {{domxref("Window")}} instance representing the browsing context inside the Picture-in-Picture window.

## Instance methods

_Inherits methods from its parent, {{DOMxRef("EventTarget")}}._

- {{domxref("DocumentPictureInPicture.requestWindow", "requestWindow()")}} {{Experimental_Inline}}
- : Opens the Picture-in-Picture window for the current main browsing context. Returns a {{jsxref("Promise")}} that fulfills with a {{domxref("Window")}} instance representing the browsing context inside the Picture-in-Picture window.

## Events

_Inherits events from its parent, {{DOMxRef("EventTarget")}}._

- {{domxref("DocumentPictureInPicture/enter_event", "enter")}} {{Experimental_Inline}}
- : Fired when the Picture-in-Picture window is successfully opened.

Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/documentpictureinpictureevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ The **`DocumentPictureInPictureEvent`** interface of the {{domxref("Document Pic
- {{domxref("DocumentPictureInPictureEvent.DocumentPictureInPictureEvent", "DocumentPictureInPictureEvent()")}} {{Experimental_Inline}}
- : Creates a new `DocumentPictureInPictureEvent` object instance.

## Instance methods

_Inherits methods from its parent, {{DOMxRef("Event")}}._

## Instance properties

_Inherits properties from its parent, {{DOMxRef("Event")}}._

- {{domxref("DocumentPictureInPictureEvent.window", "window")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : Returns a {{domxref("Window")}} instance representing the browsing context inside the `DocumentPictureInPicture` window the event was fired on.

## Instance methods

_Inherits methods from its parent, {{DOMxRef("Event")}}._

## Examples

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.Window.documentPictureInPicture
---

{{APIRef}}{{seecompattable}}{{SecureContext_Header}}
{{APIRef("Document Picture-in-Picture API")}}{{SeeCompatTable}}{{SecureContext_Header}}

The **`documentPictureInPicture`** read-only property of the
{{domxref("Window")}} interface returns a reference to the {{domxref("DocumentPictureInPicture")}} object for the current document context.
Expand Down