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 795349 of PeriodicSyncManager

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

Revision Content

{{APIRef("Service Workers API")}}{{Non-standard_header}}

The PeriodicSyncManager interface of the the ServiceWorker API provides an interface for registering and retrieving {{domxref("PeriodicSyncRegistration")}} objects.

Properties

{{domxref("PeriodicSyncManager.minPossiblePeriod")}} {{readonlyinline}}
Indicates in milliseconds the minimum time between {{domxref("PeriodicSyncEvents")}} events.

Methods

{{domxref("PeriodicSyncManager.register")}}
Returns a {{jsxref("Promise")}} that resolves to a {{domxref("PeriodicSyncRegistration")}} instance.
{{domxref("PeriodicSyncManager.getRegistration")}}
Returns a {{jsxref("Promise")}} that resolves to the {{domxref("PeriodicSyncRegistration")}} instance with the given {{domxref("PeriodicSyncRegistrationOptions.id","id")}}.
{{domxref("PeriodicSyncManager.getRegistrations")}}
Returns a {{jsxref("Promise")}} that resolves to an array of all existing {{domxref("PeriodicSyncRegistration")}} instances.
{{domxref("PeriodicSyncManager.permissionState")}}
Returns a {{jsxref("Promise")}} that resolves to "default", "denied", or "granted".

Examples

// TBD

Browser compatibility

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

Revision Source

<p>{{APIRef("Service Workers API")}}{{Non-standard_header}}</p>

<p>The PeriodicSyncManager interface of the the <a href="/en-US/docs/Web/API/ServiceWorker_API">ServiceWorker API</a> provides an interface for registering and retrieving {{domxref("PeriodicSyncRegistration")}} objects.</p>

<h2 id="Properties">Properties</h2>

<dl>
 <dt>{{domxref("PeriodicSyncManager.minPossiblePeriod")}} {{readonlyinline}}</dt>
 <dd>Indicates in milliseconds the minimum time between {{domxref("PeriodicSyncEvents")}}&nbsp;events.</dd>
</dl>

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

<dl>
 <dt>{{domxref("PeriodicSyncManager.register")}}</dt>
 <dd>Returns a {{jsxref("Promise")}} that resolves to a {{domxref("PeriodicSyncRegistration")}} instance.</dd>
 <dt>{{domxref("PeriodicSyncManager.getRegistration")}}</dt>
 <dd>Returns a {{jsxref("Promise")}} that resolves to the {{domxref("PeriodicSyncRegistration")}} instance with the given {{domxref("PeriodicSyncRegistrationOptions.id","id")}}.</dd>
 <dt>{{domxref("PeriodicSyncManager.getRegistrations")}}</dt>
 <dd>Returns a {{jsxref("Promise")}} that resolves to an array of all existing {{domxref("PeriodicSyncRegistration")}} instances.</dd>
 <dt>{{domxref("PeriodicSyncManager.permissionState")}}</dt>
 <dd>Returns a {{jsxref("Promise")}} that resolves to <code>"default"</code>, <code>"denied"</code>, or <code>"granted"</code>.</dd>
</dl>

<h2 id="Examples">Examples</h2>

<pre class="brush: js">
// TBD</pre>

<h2 id="Browser_compatibility"><span style="font-size:2.14285714285714rem">Browser compatibility</span></h2>

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

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</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(43.0)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</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>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatChrome(43.0)}}</td>
  </tr>
 </tbody>
</table>
</div>
Revert to this revision