Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. 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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
hasPermission | Chrome Full support 42 | Edge
Full support
16
| Firefox
Full support
44
| IE No support No | Opera Full support 29 | Safari No support No | WebView Android No support No | Chrome Android Full support 42 | Firefox Android
Full support
48
| Opera Android Full support 29 | Safari iOS No support No | Samsung 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.