PeriodicSyncEvent: tag プロパティ
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
メモ: この機能はサービスワーカー内でのみ利用可能です。
PeriodicSyncEvent
インターフェイスの読み取り専用プロパティ tag
は、PeriodicSyncEvent
用の開発者定義の識別子を返します。これは、PeriodicSyncManager
インターフェイスの PeriodicSyncManager.register()
メソッドを呼ぶ際に指定されます。ウェブアプリケーションは、異なる定期的なタスクを異なる頻度で実行するため、複数のタグを使用できます。
値
定義された識別子を表す String
を返します。
例
以下の例は、サービスワーカーで定期的な同期イベントを受け取り、tag
プロパティにアクセスするデモを行います。
js
self.addEventListener("periodicsync", (event) => {
console.log(event.tag); // イベントのタグを記録する
});
仕様書
Specification |
---|
Web Periodic Background Synchronization # dom-periodicsyncevent-tag |
ブラウザーの互換性
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.
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.