SyncEvent: SyncEvent() constructor
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note: This feature is only available inService Workers.
TheSyncEvent() constructor creates a newSyncEvent object.
In this article
Syntax
js
new SyncEvent(type, options)Parameters
typeA string with the name of the event.It is case-sensitive and browsers always set it to
sync.optionsAn object that, in addition to the properties defined in
ExtendableEvent(), can have the following properties:tagA developer-defined unique identifier for this
SyncEvent.lastChanceOptionalA boolean value indicating that the user agent will not make further synchronization attempts after the current attempt.It defaults to
false.
Return value
A newSyncEvent object.
Specifications
| Specification |
|---|
| Web Background Synchronization> # dom-syncevent-syncevent> |