The CompositionEvent()
constructor creates a new CompositionEvent
object instance.
myEvent = new CompositionEvent(typeArg, CompositionEventInit)
DOMString
representing the name of the event.CompositionEventInit
dictionary object, which can contain the following members: data
: Initializes the data
attribute of the CompositionEvent
object to the characters generated by the IME composition.Note: The CompositionEventInit
dictionary inherits from the UIEventInit
dictionary, so can also accept members defined on there.
Specification | Status | Comment |
---|---|---|
Document Object Model (DOM) Level 3 Events Specification The definition of 'CompositionEvent()' in that specification. | Obsolete | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | ? | 53 | Yes | No | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | ? | 53 | ? | ? | ? |
CompositionEvent
, the interface of the objects it constructs.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/CompositionEvent