We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

PermissionStatus.status

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

 

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

This property has been replaced by PermissionStatus.state.

The PermissionStatus.status read-only property of the PermissionStatus interface returns the status of a requested permission. This property returns one of 'granted', 'denied', or 'prompt'.

Syntax

var permission = PermissionStatus.status

Example

navigator.permissions.query({name:'geolocation'}).then(function(permissionStatus) {
  console.log('geolocation permission status is ', permissionStatus.status);
  permissionStatus.onchange = function() {
    console.log('geolocation permission status has changed to ', this.status);
  };
});

Specification

Specification Status Comment
Permissions
The definition of 'status' in that specification.
Working Draft Initial definition.

Browser Support

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 43.0 [1] Deprecated ? ? ?
Feature Android Chrome Mobile Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile Chrome for Android
Basic support No support 43.0 [1] Deprecated ? ? ? ? 43.0 [1]

[1] Removed in Chrome 47.

Document Tags and Contributors

Contributors to this page: jpmedley, chrisdavidmills
Last updated by: jpmedley,