Back to Content

Navigator: presentation property

files/en-us/web/api/navigator/presentation/index.md

latest1002 B
Original Source

{{securecontext_header}}{{APIRef("Presentation API")}}

The presentation read-only property of {{DOMxRef("Navigator")}} serves as the entry point for the Presentation API and returns a reference to {{DOMxRef("Presentation")}} object.

Value

A reference to {{DOMxRef("Presentation")}} object.

Examples

Currently, the navigator.presentation property is most useful for feature checking, and, for the receiving user agent, to access the {{domxref("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.");
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also