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
Loading…