SyncEvent()

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The SyncEvent() constructor creates a new SyncEvent object.

Syntax

new SyncEvent(type, options)

Parameters

type

A string with the name of the event. It is case-sensitive and browsers always set it to sync.

options

An object that, in addition of the properties defined in ExtendableEvent(), can have the following properties:

tag

A developer-defined unique identifier for this SyncEvent.

lastChance Optional

A boolean value indicating that the user agent will not make further synchronization attempts after the current attempt. It defaults to false.

Return value

A new SyncEvent object.

Specifications

Specification
Web Background Synchronization
# dom-syncevent-syncevent

Browser compatibility

BCD tables only load in the browser