WorkerNavigator.permissions

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

The WorkerNavigator.permissions read-only property returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API.

Syntax

permissionsObj = self.permissions

Value

A Permissions object.

Examples

self.permissions.query({name:'notifications'}).then(function(result) {
  if (result.state === 'granted') {
    showNotification();
  } else if (result.state === 'prompt') {
    requestNotificationPermission()
  }
});

Specification

Specification Status Comment
Permissions Working Draft Initial definition.

Browser Support

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 43Edge ? Firefox Full support 46IE ? Opera Full support 30Safari ? WebView Android Full support 43Chrome Android Full support 43Edge Mobile ? Firefox Android Full support 46Opera Android Full support 30Safari iOS ? Samsung Internet Android Full support 4.0

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also

Document Tags and Contributors

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