CompositionEvent
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The DOMCompositionEvent represents events that occur due to the user indirectly entering text.
In this article
Constructor
CompositionEvent()Creates a new
CompositionEventobject instance.
Instance properties
This interface also inherits properties of its parent,UIEvent, and its ancestor —Event.
CompositionEvent.dataRead onlyReturns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the
CompositionEventobject.CompositionEvent.localeRead onlyDeprecatedNon-standardReturns the locale of the current input method (for example, the keyboard layout locale if the composition is associated with anInput method editor).
Instance methods
This interface also inherits methods of its parent,UIEvent, and its ancestor —Event.
CompositionEvent.initCompositionEvent()DeprecatedInitializes the attributes of a
CompositionEventobject.
Specifications
| Specification |
|---|
| UI Events> # interface-compositionevent> |