PictureInPictureEvent()

The PictureInPictureEvent() constructor returns a newly created PictureInPictureEvent object with an optional EventTarget. When the event has both a source and a destination, the relatedTarget value must be set to the other target.

Syntax

var pictureInPictureEvent = new PictureInPictureEvent(typeArg[, pictureInPictureInit]);

Properties

The PictureInPictureEvent() constructor also inherits arguments from Event().

typeArg

Is a DOMString representing the name of the event.

focusEventInit Optional

Is a PictureInPictureEventInit dictionary, having the following fields:

  • "relatedTarget", optional and defaulting to null, is an EventTarget.

Specifications

Specification
Picture-in-Picture
# dom-pictureinpictureevent-pictureinpictureevent

Browser compatibility

BCD tables only load in the browser

See also