Esta es una tecnología experimental
Comprueba la Tabla de compabilidad de navegadores cuidadosamente antes de usarla en producción.

El metodo permissionState()  de la interface   PushManager retorna un Promise that resolves to a DOMString indicating the permission state of the push manager. Possible values are  'prompt', 'denied', or 'granted'.

Note: As of Firefox 44, the permissions for Notifications and Push have been merged. If permission is granted for notifications, push will also be enabled.


PushManager.permissionState(options).then(function(PushMessagingState) { ... });


opciones Optional
An object containing optional configuration parameters. It can have the following properties:
  • userVisibleOnly: A boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user.


Un Promise que resuelve a un DOMString con un valor de  'prompt', 'denied', o 'granted'.


Especificación Estado Comentario
Push API
La definición de 'permissionState()' en esta especificación.
Working Draft Initial definition.

Compactibilidad del Navegador

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help! (en-US)
Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 42.0 44.0 (44.0) Sin soporte ? Sin soporte
Característica Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support Sin soporte Sin soporte Sin soporte Sin soporte Sin soporte Sin soporte Sin soporte 42.0

Ver también