Navigator: presentation 屬性
Navigator 的只讀屬性 presentation 是 Presentation API 的入口點,它返回一個指向 Presentation 物件的引用。
值
指向 Presentation 物件的引用。
示例
當前,navigator.presentation 屬性對於功能檢查非常有用,並且對於接收使用者代理來說,可以訪問 PresentationReceiver。
js
// Check if the Presentation API is available in the current browser
if ("presentation" in navigator) {
footer.textContent = navigator.presentation.receiver
? "Receiving presentation"
: "(idle)";
} else {
console.error("Presentation API is not available in this browser.");
}
規範
| 規範 |
|---|
| Presentation API # dom-navigator-presentation |
瀏覽器相容性
載入中…