The DOM CompositionEvent represents events that occur due to the user indirectly entering text.
Constructor
CompositionEvent()- Creates a new
CompositionEventobject instance.
Properties
This interface also inherits properties of its parent, UIEvent, and its ancestor — Event.
CompositionEvent.dataRead only- Returns 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 only- 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()- Initializes the attributes of a
CompositionEventobject.
Specifications
| Specification | Status | Comment |
|---|---|---|
| Document Object Model (DOM) Level 3 Events Specification The definition of 'CompositionEvent' in that specification. |
Working Draft |
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | 9.0 (9.0) | (Yes) | No support | ? |
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | ? | (Yes) | 9.0 (9.0) | ? | ? | ? |
See also
Document Tags and Contributors
Tags:
Contributors to this page:
chrisdavidmills,
erikadoyle,
gurdiga,
fscholz,
teoli,
kscarfone,
tregagnon,
Sheppy,
ethertank,
Masayuki
Last updated by:
chrisdavidmills,