{{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")}} object.
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 | {{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)}} |