The provides a consistent programmatic way to query the status of API permissions attributed to the current context. For example, the Permissions API can be used to determine if permission to access a particular API has been granted or denied. Permissions API Concepts and usage Historically different APIs handle their own permissions inconsistently — for example the allows for explicit checking of permission status and requesting permission, whereas the doesn't (which causes problems if the user denied the initial permission request). The Permissions API provides the tools to allow developers to implement a better user experience as far as permissions are concerned. Notifications API Geolocation API The property has been made available on the object, both in the standard browsing context and the worker context ( — so permission checks are available inside workers), and returns a object that provides access to the Permissions API functionality. permissions Navigator WorkerNavigator Permissions Once you have this object you can then perform permission-related tasks, for example querying a permission using the method to return a promise that resolves with the for a specific API. Permissions.query() PermissionStatus Not all APIs' permission statuses can be queried using the Permissions API. Notable APIs that are Permissions-aware include: Clipboard API Notifications API Push API Web MIDI API More APIs will gain Permissions API support over time. Examples We have made a simple example available called Location Finder. You can , or . run the example live view the source code on Github Read more about how it works in our article . Using the Permissions API Interfaces and Navigator.permissions WorkerNavigator.permissions Provides access to the object from the main context and worker context respectively. Permissions Permissions Provides the core Permission API functionality, such as methods for querying and revoking permissions. PermissionStatus Provides access to the current status of a permission, and an event handler to respond to changes in permission status. Specification Browser compatibility Permissions interface See also Using the Permissions API Using the Permissions API to Detect How Often Users Allow or Deny Camera Access Notification.permission Privacy, permissions, and information security Credits Source: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API Published under licence Open CC Attribution ShareAlike 3.0