PictureInPictureEvent()
The PictureInPictureEvent()
constructor returns a new 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
new PictureInPictureEvent(type, options)
Parameters
type
-
A string representing the name of the event.
options
-
An object that, in addition of the properties defined in
Event()
, can have the following properties:-
The related
EventTarget
, ornull
(its default value).
-
Return value
A new PictureInPictureEvent
object.
Specifications
Specification |
---|
Picture-in-Picture # dom-pictureinpictureevent-pictureinpictureevent |
Browser compatibility
BCD tables only load in the browser
See also
- The
PictureInPictureEvent
interface it belongs to.