PushManager.hasPermission()

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.

The PushManager.hasPermission() method of the PushManager interface returns a Promise that resolves to the PushPermissionStatus of the requesting webapp, which will be one of granted, denied, or default.

Syntax

​PushManager.hasPermission().then(function(pushPermissionStatus) { ... } );

Example

// TBD

Specification

Specification Status Comment
Push API Working Draft Defines the PushManager interface.

Browser Compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support 42Edge Full support 16
Disabled
Full support 16
Disabled
Disabled From version 16: this feature is behind the Enable service workers preference.
Full support 17
Firefox Full support 44
Notes
Full support 44
Notes
Notes Service workers (and Push) have been disabled in the Firefox 45 and 52 Extended Support Releases (ESR.)
IE No support NoOpera Full support 29Safari No support NoWebView Android No support NoChrome Android Full support 42Edge Mobile Full support YesFirefox Android Full support 48
Notes
Full support 48
Notes
Notes Push enabled by default.
Opera Android Full support 29Safari iOS No support NoSamsung Internet Android Full support 4.0

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

Document Tags and Contributors

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