Skip to content

Commit

Permalink
Update in Document Picture-In-Picture API (#35918)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyclouds2001 authored Oct 8, 2024
1 parent a96eef6 commit bac20b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
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

0 comments on commit bac20b9

Please sign in to comment.