JavaScript Navigator permissions Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.permissions is a read-only property that returns a Permissions object — the entry point to the Permissions API. Use it to query (and, where available, update) permission status for covered features (MDN).

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

Syntax

Use navigator.permissions. Start with this line.

JavaScript
navigator.permissions
CallWhat it does
navigator.permissionsPrimary signature.

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

Library declarations
JavaScript
navigator.permissions

Parameters

ParameterDescription
query({ name })Required. Ask for current status (async)
PermissionStatus.stateRequired. granted / prompt / denied
change eventOptional. React when the user updates settings

Return Value

Return ValueDescription
*The current value of navigator.permissions.

JavaScript Examples

Example 1 — Feature-Detect Support

Check whether the Permissions API exists before calling query().

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

How It Works

  1. Use in. Checks whether the property exists on navigator.
  2. Modern path. Evergreen browsers expose the Permissions API.
  3. Missing path. Skip query() and rely on feature-API error handling instead.
  4. Rule. Always detect before chaining .query().

Example 2 — Query Geolocation (MDN)

Branch UI on granted vs prompt; leave denied alone.

JavaScript
async function checkGeoPermission() {
  if (!navigator.permissions) {
    console.log("Permissions API missing");
    return;
  }
  const result = await navigator.permissions.query({ name: "geolocation" });
  if (result.state === "granted") {
    console.log("granted — showMap()");
  } else if (result.state === "prompt") {
    console.log("prompt — showButtonToEnableMap()");
  } else {
    console.log("denied — do not nag");
  }
}

checkGeoPermission();
Try It Yourself

How It Works

  1. Guard. Exit early if the API is missing.
  2. Query. Ask for the geolocation permission descriptor.
  3. Branch. Match MDN: map when granted, Enable button when prompt.
  4. Denied. Do not loop prompts — offer a fallback instead.

Example 3 — Listen for change

PermissionStatus fires change when the user updates the decision.

JavaScript
async function watchGeoPermission() {
  if (!navigator.permissions) {
    console.log("Permissions API missing");
    return;
  }
  const status = await navigator.permissions.query({ name: "geolocation" });
  console.log("initial: " + status.state);
  status.addEventListener("change", () => {
    console.log("changed: " + status.state);
  });
}

watchGeoPermission();
Try It Yourself

How It Works

  1. Query once. Get a live PermissionStatus object.
  2. Log the start. Useful for settings panels and map UIs.
  3. Subscribe. The change event fires when state updates.
  4. Why it helps. Hide the Enable button after the user grants access in browser settings.

Browser Support

navigator.permissions is Baseline Widely available (MDN: since September 2022). Individual permission names can still differ across browsers — feature-detect and catch query errors.

✓ Baseline · Widely available

Navigator.permissions

Query permission status for permission-aware UX. Pair with the real feature API (geolocation, media, and so on) when you need the capability itself.

94% Modern browser support
Google Chrome Full support · Desktop & Mobile
Full support
Mozilla Firefox Full support · Desktop & Mobile
Full support
Apple Safari Full support · modern Safari
Full support
Microsoft Edge Full support · Chromium
Full support
Opera Full support · Modern versions
Full support
Internet Explorer Not supported
No support
permissions Excellent

Bottom line: Detect navigator.permissions, query safely, branch on granted/prompt/denied, and never nag after denial. Avoid deprecated revoke().

Frequently Asked Questions

It is a read-only Navigator property that returns a Permissions object — the entry point to the Permissions API for querying permission status of covered browser features.
No. MDN marks navigator.permissions as Baseline Widely available (since September 2022). It is not Deprecated, Experimental, or Non-standard. Note: Permissions.revoke() is Deprecated separately.
Call navigator.permissions.query({ name: "geolocation" }) (or another supported name). It returns a Promise that resolves to a PermissionStatus with state granted, prompt, or denied.
Usually no — query() reports the current status. The browser typically shows a prompt when you call the feature API itself (for example getCurrentPosition). Always handle denial gracefully.
granted means the feature may run without asking again. prompt means the browser may ask when you request it. denied means access is blocked — do not keep prompting; show an alternative UX.
No. The property is read-only. You use methods on the returned Permissions object, such as query().

Next: platform

Continue with the next Navigator property in the JavaScript guide.

platform 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.

8 people found this page helpful