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.

Revision 765991 of PushRegistrationManager

  • Revision slug: Web/API/PushRegistrationManager
  • Revision title: PushRegistrationManager
  • Revision id: 765991
  • Created:
  • Creator: jpmedley
  • Is current revision? No
  • Comment

Revision Content

{{SeeCompatTable}}{{APIRef("Push API")}}

Returns an interface to register or unregister a push registration, get an active registration, or check the permission status of the registration.

Methods

{{domxref("PushRegistrationManager.register()")}}
Returns a promise that resolves to a {{domxref("PushRegistration")}} with details of a new registration.
{{domxref("PushRegistrationManager.unregister()")}}
Returns a promise that resolves to a {{domxref("PushRegistration")}} with details of the unregistered registration.
{{domxref("PushRegistrationManager.getRegistration()")}}
Returns a promise that resolves the {{domxref("PushRegistration")}} associated with the current webapp.
{{domxref("PushRegistrationManager.hasPermission()")}}
Returns a promise that resolves to the {{domxref("PushPermissionStatus")}} of the requesting webapp.

Example

//

Specifications

Specification Status Comment
{{SpecName('Push API', '#idl-def-PushRegistrationManager', 'PushRegistrationManager')}} {{Spec2('Push API')}} Initial definition.
 

Browser Compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatChrome(42.0)}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
{{CompatChrome(42.0)}}

Revision Source

<p>{{SeeCompatTable}}{{APIRef("Push API")}}</p>

<p>Returns an interface to register or unregister a push registration, get&nbsp;an active registration, or check the permission status of the registration.</p>

<h2 id="Methods">Methods</h2>

<dl>
 <dt>{{domxref("PushRegistrationManager.register()")}}</dt>
 <dd>Returns a promise that resolves to a {{domxref("PushRegistration")}} with details of a new registration.</dd>
 <dt>{{domxref("PushRegistrationManager.unregister()")}}</dt>
 <dd>Returns a promise that resolves to a&nbsp;{{domxref("PushRegistration")}} with details of the unregistered registration.</dd>
 <dt>{{domxref("PushRegistrationManager.getRegistration()")}}</dt>
 <dd>Returns a promise that resolves the&nbsp;{{domxref("PushRegistration")}} associated with the current webapp.</dd>
 <dt>{{domxref("PushRegistrationManager.hasPermission()")}}</dt>
 <dd>Returns a promise that resolves to the {{domxref("PushPermissionStatus")}} of the requesting webapp.</dd>
 <dt>
 <h2 id="Example">Example</h2>

 <pre>
//</pre>

 <h2 id="Specifications">Specifications</h2>

 <table class="standard-table">
  <tbody>
   <tr>
    <th scope="col">Specification</th>
    <th scope="col">Status</th>
    <th scope="col">Comment</th>
   </tr>
   <tr>
    <td>{{SpecName('Push API', '#idl-def-PushRegistrationManager', 'PushRegistrationManager')}}</td>
    <td>{{Spec2('Push API')}}</td>
    <td>Initial definition.<br />
     &nbsp;</td>
   </tr>
  </tbody>
 </table>

 <h2 id="Browser_Compatibility">Browser Compatibility</h2>

 <div>{{CompatibilityTable}}</div>

 <div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th style="line-height: 16px;">Feature</th>
    <th style="line-height: 16px;">Chrome</th>
    <th style="line-height: 16px;">Firefox (Gecko)</th>
    <th style="line-height: 16px;">Internet Explorer</th>
    <th style="line-height: 16px;">Opera</th>
    <th style="line-height: 16px;">Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatChrome(42.0)}}</td>
    <td><span style="font-size: 12px; font-weight: bold; line-height: 18px;">{{CompatUnknown}}</span></td>
    <td><span style="font-size: 12px; font-weight: bold; line-height: 18px;">{{CompatUnknown}}</span></td>
    <td>{{CompatUnknown}}</td>
    <td><span style="font-size: 12px; font-weight: bold; line-height: 18px;">{{CompatUnknown}}</span></td>
   </tr>
  </tbody>
 </table>
 </div>

 <div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th style="line-height: 16px;">Feature</th>
    <th style="line-height: 16px;">Android</th>
    <th style="line-height: 16px;">Firefox Mobile (Gecko)</th>
    <th style="line-height: 16px;">Firefox OS</th>
    <th style="line-height: 16px;">IE Mobile</th>
    <th style="line-height: 16px;">Opera Mobile</th>
    <th style="line-height: 16px;">Safari Mobile</th>
    <th style="line-height: 16px;">Chrome for Android</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatUnknown}}</td>
    <td><span style="font-size: 12px; font-weight: bold; line-height: 18px;">{{CompatUnknown}}</span></td>
    <td>{{CompatUnknown}}</td>
    <td><span style="font-size: 12px; font-weight: bold; line-height: 18px;">{{CompatUnknown}}</span></td>
    <td>{{CompatUnknown}}</td>
    <td><span style="font-size: 12px; font-weight: bold; line-height: 18px;">{{CompatUnknown}}</span></td>
    <td>
     <table class="compat-table" style="font-weight: bold;">
      <tbody>
       <tr>
        <td>{{CompatChrome(42.0)}}</td>
       </tr>
      </tbody>
     </table>
    </td>
   </tr>
  </tbody>
 </table>
 </div>
 </dt>
</dl>
Revert to this revision