PeriodicSyncEvent: tag property
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 tag
read-only property of the
PeriodicSyncEvent
interface returns the developer-defined identifier for
the PeriodicSyncEvent
. This is specified when calling the
PeriodicSyncManager.register()
method of the
PeriodicSyncManager
interface. Multiple tags can be used by the web app
to run different periodic tasks at different frequencies.
Value
Returns a String
of the defined identifier.
Examples
The following example demonstrates listening for a periodic sync event in the service
worker, and accessing the tag
property.
self.addEventListener("periodicsync", (event) => {
console.log(event.tag); // logs the events tag
});
Specifications
Specification |
---|
Web Periodic Background Synchronization # dom-periodicsyncevent-tag |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
tag |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.