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 |
浏览器兼容性
加载中…