Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

PushManager.permissionState()

Esta traducción está incompleta. Por favor, ayuda a traducir este artículo del inglés.

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

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.

Sintaxis

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

Parámetros

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.

Retorna

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

Especificaciones

Especificación Estado Comentario
Push API
The definition of 'permissionState()' in that specification.
Working Draft Initial definition.

Compactibilidad del Navegador

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 42.0 44.0 (44.0) Not supported ? Not supported
Característica Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support Not supported Not supported Not supported Not supported Not supported Not supported Not supported 42.0

Ver también

Etiquetas y colaboradores del documento

 Colaboradores en esta página: maedca
 Última actualización por: maedca,