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 898005 of PeriodicSyncRegistration

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

Revision Content

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

The PeriodicSyncRegistration interface of the the ServiceWorker API provides an object for managing periodic background synchronization.

Properties

{{domxref("PeriodicSyncRegistration.minPeriod")}}{{readonlyinline}}
Provides in miliseconds the minimum time between periodic sync events. User agents may delay this event for reasons ranging from usage frequency to device states such as, for example, battery charge, connectivity, and location.
{{domxref("PeriodicSyncRegistration.networkState")}}{{readonlyinline}}
Indicates the network condition under which periodic background synchronization will occur. Valid values are 'any', 'avoid-cellular', and 'online'.
{{domxref("PeriodicSyncRegistration.powerState")}} {{readonlyinline}}
Indicates how the PeriodicSyncRegistration deals with a devices' battery conditions. Valid values are 'auto', and 'avoid-draining'.
{{domxref("PeriodicSyncRegistration.tag")}}{{readonlyinline}}
Provides the unique identifier of the specified {{domxref("PeriodicSyncRegistration")}}.

Methods

{{domxref("PeriodicSyncRegistration.unregister")}}
Returns a {{jsxref("Promise")}} that resolves to Boolean indicating whether the {{domxref("PeriodicSyncRegistration")}} object was unregistered.

Examples

// TBD

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatNo}} {{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}} {{CompatNo}}

Revision Source

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

<p>The <code><strong>PeriodicSyncRegistration</strong></code> interface of the the <a href="/en-US/docs/Web/API/ServiceWorker_API">ServiceWorker API</a> provides an object for managing periodic background synchronization.</p>

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

<dl>
 <dt style="line-height: 19.0909080505371px;">{{domxref("PeriodicSyncRegistration.minPeriod")}}{{readonlyinline}}</dt>
 <dd style="line-height: 19.0909080505371px;">Provides in miliseconds the minimum time between periodic&nbsp;<code>sync</code>&nbsp;events.&nbsp;User agents may delay this event for reasons ranging from usage frequency to device states such as, for example, battery charge, connectivity, and location.</dd>
 <dt style="line-height: 19.0909080505371px;">{{domxref("PeriodicSyncRegistration.networkState")}}{{readonlyinline}}</dt>
 <dd style="line-height: 19.0909080505371px;">Indicates the network condition under which periodic background synchronization will occur. Valid values are <code>'any'</code>, <code>'avoid-cellular'</code>, and <code>'online'</code>.</dd>
 <dt style="line-height: 19.0909080505371px;">{{domxref("PeriodicSyncRegistration.powerState")}} {{readonlyinline}}</dt>
 <dd style="line-height: 19.0909080505371px;">Indicates how the PeriodicSyncRegistration deals with a devices' battery conditions. Valid values are <code>'auto'</code>, and <code>'avoid-draining'</code>.</dd>
 <dt>{{domxref("PeriodicSyncRegistration.tag")}}{{readonlyinline}}</dt>
 <dd>Provides the unique identifier of the specified {{domxref("PeriodicSyncRegistration")}}.</dd>
</dl>

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

<dl>
 <dt>{{domxref("PeriodicSyncRegistration.unregister")}}</dt>
 <dd>Returns a {{jsxref("Promise")}} that resolves to Boolean indicating whether the {{domxref("PeriodicSyncRegistration")}}&nbsp;object was unregistered.</dd>
</dl>

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

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

<h2 id="Browser_compatibility">Browser compatibility</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>{{CompatNo}}</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>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>
Revert to this revision