JavaScript Navigator presentation Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.presentation is a read-only property that returns a Presentation object — the entry point to the Presentation API for controlling or receiving content on another screen (MDN).

Read the notes below before you rely on this property. Prefer feature detection when support is limited.

Syntax

Use navigator.presentation. Start with this line.

JavaScript
navigator.presentation
CallWhat it does
navigator.presentationPrimary signature.

Built into the browser. Read navigator.presentation on Navigator — no import required.

Library declarations
JavaScript
navigator.presentation

Parameters

ParameterDescription
defaultRequestOptional. PresentationRequest for controlling UAs
HTTPSRequired. Secure-context requirement

Return Value

Return ValueDescription
*The current value of navigator.presentation.

JavaScript Examples

Example 1 — Feature-Detect Support

Check whether the Presentation API entry point exists.

JavaScript
if ("presentation" in navigator) {
  console.log("presentation available");
} else {
  console.log("presentation missing");
}
Try It Yourself

How It Works

  1. Use in. Checks whether the property exists on navigator.
  2. Supported path. You can safely read navigator.presentation.
  3. Missing path. Hide cast UI and keep a single-screen experience.
  4. Rule. Always detect before touching receiver or defaultRequest.

Example 2 — Idle vs Receiving (MDN)

MDN’s pattern: show whether this page is receiving a presentation.

JavaScript
if ("presentation" in navigator) {
  const status = navigator.presentation.receiver
    ? "Receiving presentation"
    : "(idle)";
  console.log(status);
} else {
  console.log("Presentation API is not available in this browser.");
}
Try It Yourself

How It Works

  1. Detect first. Matches MDN’s feature-check wrapper.
  2. Read receiver. Truthy only in a receiving browsing context.
  3. Idle label. Normal tabs almost always print (idle).
  4. Unsupported. Log a clear error instead of throwing.

Example 3 — Secure Context Check

Pair API detection with HTTPS / localhost awareness.

JavaScript
const lines = [
  "isSecureContext: " + window.isSecureContext,
  "presentation: " +
    ("presentation" in navigator ? "available" : "missing")
];

console.log(lines.join("\n"));
Try It Yourself

How It Works

  1. Secure context. MDN requires HTTPS (or localhost) where supported.
  2. API flag. Separate from HTTPS — both must line up for casting flows.
  3. Log both. Helps debug “API missing” vs “insecure page” issues.
  4. Production tip. Never assume casting works on plain HTTP.

Browser Support

navigator.presentation has limited availability and is not Baseline. The Presentation interface is Experimental. Always feature-detect and provide a non-presentation fallback.

✓ Experimental · Limited availability

Navigator.presentation

Entry point to the Presentation API. Best used first for feature checking and receiver vs idle status. Requires a secure context where supported.

Limited Not Baseline
Google Chrome Partial / Chromium Presentation API support
Partial
Mozilla Firefox Limited or unavailable
Limited
Apple Safari Limited or unavailable
Limited
Microsoft Edge Partial / Chromium-based
Partial
Opera Chromium-based / varies
Partial
Internet Explorer Not available
No support
presentation Limited

Bottom line: Detect "presentation" in navigator, confirm HTTPS, then branch on receiver. Never require casting for core UX.

Frequently Asked Questions

It is a read-only Navigator property that returns a Presentation object — the entry point to the Presentation API for controlling or receiving presentations on secondary displays.
The Presentation interface is Experimental and not Baseline. MDN marks navigator.presentation as limited availability. Always feature-detect and keep a non-presentation fallback UX.
Yes in supporting browsers: it is available only in secure contexts (HTTPS or localhost).
On a receiving browsing context, navigator.presentation.receiver returns a PresentationReceiver. On a normal controlling page it is typically null / falsy — MDN’s example shows “Receiving presentation” vs “(idle)”.
In a controlling context you can set navigator.presentation.defaultRequest to a PresentationRequest so the browser can use it for chrome-initiated casting. In a receiving context it is null.
No. The property is read-only. You use fields on the returned Presentation object (such as defaultRequest and receiver).

Next: product

Continue with the next Navigator property in the JavaScript guide.

product tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

7 people found this page helpful