ShadowRoot: pictureInPictureElement 屬性
ShadowRoot 介面的 pictureInPictureElement 只讀屬性返回目前在此 shadow tree 中以畫中畫模式呈現的 Element,如果當前未在使用畫中畫模式,則返回 null。
值
目前處於畫中畫模式的 Element 物件的引用。
如果 shadow tree 中沒有關聯的畫中畫元素,則返回 null。例如,沒有畫中畫元素,或者該元素不在 shadow tree 中。
示例
js
let customElem = document.querySelector("my-shadow-dom-element");
let shadow = customElem.shadowRoot;
let pipElem = shadow.pictureInPictureElement;
規範
| 規範 |
|---|
| 畫中畫 # dom-pictureinpictureevent-pictureinpicturewindow |
瀏覽器相容性
載入中…