DocumentPictureInPicture

The DocumentPictureInPicture interface of the Document Picture-in-Picture API is the entry point for creating and handling document picture-in-picture windows. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard
external val window: Window

The window read-only property of the DocumentPictureInPicture interface returns a Window instance representing the browsing context inside the Picture-in-Picture window.

Functions

Link copied to clipboard
open external fun dispatchEvent(event: Event): Boolean
Link copied to clipboard

The requestWindow() method of the DocumentPictureInPicture interface opens the Picture-in-Picture window for the current main browsing context. It returns a Promise that fulfills with a Window instance representing the browsing context inside the Picture-in-Picture window.

Link copied to clipboard
external fun requestWindowAsync(options: DocumentPictureInPictureOptions = definedExternally): Promise<Window>

The requestWindow() method of the DocumentPictureInPicture interface opens the Picture-in-Picture window for the current main browsing context. It returns a Promise that fulfills with a Window instance representing the browsing context inside the Picture-in-Picture window.

Link copied to clipboard
external fun <T : Event> when(type: EventType<T>, options: ObservableEventListenerOptions?): Observable<T>