SyncEvent

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

备注: 此特性仅在 Service Worker 中可用。

Background Synchronization APISyncEvent 接口表示在 ServiceWorker 的 ServiceWorkerGlobalScope 上分派的同步操作。

此接口继承自 ExtendableEvent 接口。

Event ExtendableEvent SyncEvent

构造函数

SyncEvent()

创建一个新的 SyncEvent 对象。

实例属性

自其父级 ExtendableEventEvent继承属性

SyncEvent.tag 只读

返回此 SyncEvent 的开发人员定义的标识符。

SyncEvent.lastChance 只读

如果用户代理在当前尝试之后不再进行进一步的同步尝试,则返回 true

实例方法

自其父级 ExtendableEventEvent 继承方法

无。

规范

Specification
Web Background Synchronization
# sync-event

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
SyncEvent
SyncEvent() constructor
lastChance
tag

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.