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.

DOM の CompositionEvent は、ユーザーの間接的なテキストの入力(訳注: かな漢字変換の入力など)によって発生するイベントを表します。

Event UIEvent CompositionEvent

コンストラクター

CompositionEvent()

新しい CompositionEvent オブジェクトのインスタンスを作成します。

プロパティ

このインターフェイスは、親である UIEvent および祖先である Event から継承したプロパティもあります。

CompositionEvent.data 読取専用

イベントを発生させた入力システムによって生成された文字を返します。これは、CompositionEvent オブジェクトを生成したイベントの型に応じて変わります。

CompositionEvent.locale 読取専用 非推奨; 非標準

現在の入力システムのロケールです (例えば、入力システムが IME であればそれに関連したキーボードレイアウトのロケールになります)。

メソッド

このインターフェイスは、親である UIEvent および祖先である Event から継承したメソッドもあります。

CompositionEvent.initCompositionEvent() 非推奨;

CompositionEvent オブジェクトの属性を初期化します。

仕様書

Specification
UI Events
# interface-compositionevent

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
CompositionEvent
CompositionEvent() constructor
data
initCompositionEvent
Deprecated
locale
DeprecatedNon-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.

関連情報