ServiceWorkerGlobalScope.onsync
event of the
ServiceWorkerGlobalScope
interface is
fired whenever a
SyncEvent
event occurs. This is triggered when a call to
SyncManager.register
is made from a service worker client page. The attempt to sync is made either immediately if the network is available or as soon as the network becomes available.
ServiceWorkerGlobalScope.onsync = function(SyncEvent) { ... }
self.addEventListener('sync', function(SyncEvent) { ... })
| 规范 |
|---|
| Web Background Synchronization |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onsync
|
Chrome 49 | Edge ≤79 |
Firefox
44
|
IE No | Opera 24 | Safari 11.1 | WebView Android 49 | Chrome Android 49 | Firefox Android 44 | Opera Android 24 | Safari iOS 11.3 | Samsung Internet Android 5.0 |
完整支持
不支持
实验。期望将来行为有所改变。
见实现注意事项。