Navigator: thuộc tính presentation
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Thuộc tính chỉ đọc presentation của Navigator đóng vai trò là mục nhập
điểm cho Presentation API và
trả về một tham chiếu đến đối tượng Presentation.
Giá trị
Tham chiếu đến đối tượng Presentation.
Ví dụ
Hiện tại, thuộc tính navigator.presentation hữu ích nhất cho việc kiểm tra tính năng và đối với tác nhân người dùng nhận để truy cập 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.");
}
Thông số kỹ thuật
| Specification |
|---|
| Presentation API> # dom-navigator-presentation> |