CompositionEvent: CompositionEvent() コンストラクター
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017年4月.
CompositionEvent() コンストラクターは、新しい CompositionEvent オブジェクトのインスタンスを作成します。
構文
js
new CompositionEvent(type)
new CompositionEvent(type, options)
値
type-
イベントの名前を表す文字列です。 大文字小文字の区別があり、ブラウザーは
compositionstart,compositionupdate,compositionendの何れかに設定します。 options省略可-
UIEvent()で定義されているプロパティに加えて、以下のプロパティがあるオブジェクトです。data省略可-
文字列で、新しい
CompositionEventのdataプロパティを初期化するために使用されます。ブラウザーで生成されたイベントでは、 IME の変換で生成された文字に設定されます。
返値
新しい CompositionEvent オブジェクトです。
仕様書
| Specification |
|---|
| UI Events> # dom-compositionevent-compositionevent> |
ブラウザーの互換性
関連情報
CompositionEvent: これが構築するオブジェクトのインターフェイス。