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.
new PeriodicSyncEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers set it to periodicsync.
optionsAn object that, in addition of the properties defined in Event(), can have the following properties:
tagThe tag referencing the sync event.
A new PeriodicSyncEvent object configured using the given inputs.
This example constructs a new PeriodicSyncEvent with the relevant associated tag.
const psEvent = new ExtendableEvent("periodicsync", { tag: "unique-tag" });