The CompositionEvent() constructor creates a new CompositionEvent object instance.
Syntax
myEvent = new CompositionEvent(data, CompositionEventInit)
Values
- data
- A
DOMStringrepresenting the characters entered by an input method. - CompositionEventInitOptional
- A
CompositionEventInitdictionary object, which can contain the following members:data: Initializes thedataattribute of theCompositionEventobject to the characters generated by the IME composition.
Note: The
CompositionEventInitdictionary inherits from theUIEventInitdictionary, so can also accept members defined on there.
Specifications
| Specification | Status | Comment |
|---|---|---|
| Document Object Model (DOM) Level 3 Events Specification The definition of 'CompositionEvent()' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | 53 (53) | (Yes) | No support | ? |
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | ? | (Yes) | 53.0 (53) | ? | ? | ? |
See also
CompositionEvent, the interface of the objects it constructs.
Document Tags and Contributors
Tags:
Contributors to this page:
chrisdavidmills
Last updated by:
chrisdavidmills,