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 April 2017.
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 |
ブラウザーの互換性
BCD tables only load in the browser
関連情報
CompositionEvent
: これが構築するオブジェクトのインターフェイス。