This page is not complete.

The PeriodicSyncEvent() constructor creates a new PeriodicSyncEvent object. This constructor is not typically used. The browser creates these objects itself and provides them to ServiceWorkerGlobalScope.onperiodicsync callback.


var PeriodicSyncEvent = new PeriodicSyncEvent();


A DOMString indicating the event which occurred. For PeriodicSyncEvent, this is always periodicsync.
periodicSyncEventInitDict Optional
An options object containing any initialization data you want to populate the PeriodicSyncEvent object with. The options are:
  • tag: The tag referencing the sync event.

Return value

A PeriodicSyncEvent object configured using the given inputs.


This example constructs a new PeriodicSyncEvent with the relevant associated tag.

var syncTag = {
  tag : 'unique-tag'

var psEvent = new ExtendableEvent('periodicsync', syncTag);

psEvent.tag; // should return 'unique-tag'


Specification Status Comment
Web Periodic Background Synchronization
The definition of 'PeriodicSyncEvent' in that specification.
Working Draft Initial definition.

Browser compatibility

BCD tables only load in the browser

See also