CompositionEvent

The DOM CompositionEvent represents events that occur due to the user indirectly entering text.

Constructor

CompositionEvent()
Creates a new CompositionEvent object instance.

Properties

This interface also inherits properties of its parent, UIEvent, and its ancestor — Event.

CompositionEvent.data Read only
Returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the CompositionEvent object.
CompositionEvent.locale Read only This deprecated API should no longer be used, but will probably still work.
Returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with IME).

Methods

This interface also inherits methods of its parent, UIEvent, and its ancestor — Event.

CompositionEvent.initCompositionEvent() This deprecated API should no longer be used, but will probably still work.
Initializes the attributes of a CompositionEvent object.

Specifications

Specification Status Comment
UI Events
The definition of 'CompositionEvent' in that specification.
Working Draft
Document Object Model (DOM) Level 3 Events Specification
The definition of 'CompositionEvent' in that specification.
Obsolete

Browser compatibility

BCD tables only load in the browser

See also