BackgroundFetchEvent()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
コンストラクター BackgroundFetchEvent() は新しい BackgroundFetchEvent オブジェクトを生成します。このコンストラクターは通常、使用されることはありません。なぜなら、これらのオブジェクトはブラウザーによって自動で生成され、バックグラウンドのフェッチイベントのコールバックに渡されるからです。
構文
js
new BackgroundFetchEvent(type, options)
引数
type-
イベント名の文字列。 大文字と小文字は区別されます。ブラウザーはこれを
backgroundfetchabortまたはbackgroundfetchclickに設定します。 options-
ExtendableEvent()で定義されたプロパティに加えて、下記のプロパティを持つオブジェクト。
返値
新しく生成された BackgroundFetchEvent オブジェクト。
仕様書
| Specification |
|---|
| Background Fetch> # dom-backgroundfetchevent-backgroundfetchevent> |