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