ServiceWorkerRegistration.periodicSync
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
periodicSync
は ServiceWorkerRegistration
インターフェイスの読み取り専用プロパティで、定期的なバックグラウンド同期プロセスを管理する PeriodicSyncManager
インターフェイスへの参照を返します。
値
PeriodicSyncManager
オブジェクトです。
例
このプロパティはメインスクリプトと登録済みサービスワーカーのどちらからでもアクセスできます。
ここでは、メインスクリプトからアクセスする例を示します。
js
// reference registration
const registration = await navigator.serviceWorker.ready;
// feature detection
if ("periodicSync" in registration) {
// Background Periodic Sync functionality
const periodicSync = registration.periodicSync;
}
サービスワーカーからの呼び出し例です。
js
// service worker script
const periodicSync = self.registration.periodicSync;
仕様書
Specification |
---|
Web Periodic Background Synchronization # dom-serviceworkerregistration-periodicsync |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
periodicSync |
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.
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.