ExtendableEvent: ExtendableEvent() コンストラクター
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2018.
メモ: この機能はサービスワーカー内でのみ利用可能です。
ExtendableEvent()
コンストラクターは、新しい ExtendableEvent
オブジェクトを作成します。
構文
js
new ExtendableEvent(type)
new ExtendableEvent(type, options)
引数
type
-
文字列で、このイベントの名前を指定します。大文字小文字を区別します。
options
省略可-
Event()
で定義されるプロパティに加え、イベントオブジェクトに適用したい任意のカスタム設定を含むことができるオブジェクトです。 現在、使用可能なオプションは必須ではありませんが、これは異なる形の派生イベント間で前方互換性を保つために定義されています。
返値
新しい ExtendableEvent
オブジェクト。
仕様書
Specification |
---|
Service Workers # dom-extendableevent-extendableevent |
ブラウザーの互換性
BCD tables only load in the browser