PeriodicSyncEvent: PeriodicSyncEvent() コンストラクター
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
メモ: この機能はサービスワーカー内でのみ利用可能です。
PeriodicSyncEvent() コンストラクターは、新しい PeriodicSyncEvent オブジェクトを生成します。このコンストラクターは、通常使用されません。ブラウザーがこれらのオブジェクトを作成し、onperiodicsync コールバックに渡します。
構文
js
new PeriodicSyncEvent(type, options)
引数
返値
与えられた入力を用いて設定された、新しい PeriodicSyncEvent オブジェクトです。
例
この例では、関連するタグが関連付けられた新しい PeriodicSyncEvent を構築します。
js
const psEvent = new ExtendableEvent("periodicsync", { tag: "unique-tag" });
仕様書
| Specification |
|---|
| Web Periodic Background Synchronization> # dom-periodicsyncevent-periodicsyncevent> |