PeriodicSyncEvent: PeriodicSyncEvent() constructor
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is only available in Service Workers.
The PeriodicSyncEvent() constructor
creates a new PeriodicSyncEvent object. This constructor is not typically
used. The browser creates these objects itself and provides them to
onperiodicsync callback.
Syntax
js
new PeriodicSyncEvent(type, options)
Parameters
Return value
A new PeriodicSyncEvent object configured using the given inputs.
Examples
This example constructs a new PeriodicSyncEvent with the relevant
associated tag.
js
const psEvent = new ExtendableEvent("periodicsync", { tag: "unique-tag" });
Specifications
| Specification |
|---|
| Web Periodic Background Synchronization # dom-periodicsyncevent-periodicsyncevent |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
PeriodicSyncEvent() constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.