PeriodicSyncEvent: PeriodicSyncEvent() constructor
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
new PeriodicSyncEvent(type, options)
Parameters
-
type
-
A string with the name of the event. It is case-sensitive and browsers set it to periodicsync.
-
options
-
An object that, in addition of the properties defined in Event(), can have the following properties:
-
tag
-
The tag referencing the sync event.
Return value
A new PeriodicSyncEvent object configured using the given inputs.
Examples
This example constructs a new PeriodicSyncEvent with the relevant associated tag.
const psEvent = new ExtendableEvent("periodicsync", { tag: "unique-tag" });
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
PeriodicSyncEvent |
80 |
80 |
No |
No |
67 |
No |
No |
80 |
No |
57 |
No |
13.0 |
See also