aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/pushmanager/permissionstate/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/es/web/api/pushmanager/permissionstate/index.html')
-rw-r--r--files/es/web/api/pushmanager/permissionstate/index.html111
1 files changed, 111 insertions, 0 deletions
diff --git a/files/es/web/api/pushmanager/permissionstate/index.html b/files/es/web/api/pushmanager/permissionstate/index.html
new file mode 100644
index 0000000000..f017b2da93
--- /dev/null
+++ b/files/es/web/api/pushmanager/permissionstate/index.html
@@ -0,0 +1,111 @@
+---
+title: PushManager.permissionState()
+slug: Web/API/PushManager/permissionState
+translation_of: Web/API/PushManager/permissionState
+---
+<p>{{SeeCompatTable}}{{ApiRef("Push API")}}</p>
+
+<p>El metodo <strong><code>permissionState()</code></strong>  de la interface   {{domxref("PushManager")}} retorna un {{jsxref("Promise")}} that resolves to a {{domxref("DOMString")}} indicating the permission state of the push manager. Possible values are  <code>'prompt'</code>, <code>'denied'</code>, or <code>'granted'</code>.</p>
+
+<div class="note">
+<p><strong>Note</strong>: As of Firefox 44, the permissions for <a href="/en-US/docs/Web/API/Notifications_API">Notifications</a> and <a href="/en-US/docs/Web/API/Push_API">Push</a> have been merged. If permission is granted for notifications, push will also be enabled.</p>
+</div>
+
+<h2 id="Sintaxis"><span>Sintaxis</span></h2>
+
+<pre class="syntaxbox">PushManager.permissionState(options).then(function(PushMessagingState) { ... });
+</pre>
+
+<h3 id="Parámetros">Parámetros</h3>
+
+<dl>
+ <dt><code>opciones {{optional_inline}}</code></dt>
+ <dd>An object containing optional configuration parameters. It can have the following properties:
+ <ul>
+ <li><code>userVisibleOnly</code>: A boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user.</li>
+ </ul>
+ </dd>
+</dl>
+
+<h3 id="Retorna">Retorna</h3>
+
+<p>Un {{jsxref("Promise")}} que resuelve a un {{domxref("DOMString")}} con un valor de  <code>'prompt'</code>, <code>'denied'</code>, o <code>'granted'</code>.</p>
+
+<h2 id="Especificaciones">Especificaciones</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificación</th>
+ <th scope="col">Estado</th>
+ <th scope="col">Comentario</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Push API','#widl-PushManager-permissionState-Promise-PushPermissionState--PushSubscriptionOptions-options','permissionState()')}}</td>
+ <td>{{Spec2('Push API')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compactibilidad_del_Navegador">Compactibilidad del Navegador</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(42.0)}}</td>
+ <td>{{CompatGeckoDesktop(44.0)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Firefox OS</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(42.0)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Ver_también">Ver también</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/API/Push_API/Using_the_Push_API">Using the Push API</a></li>
+</ul>