CompositionEvent.CompositionEvent()

The CompositionEvent() constructor creates a new CompositionEvent object instance.

Syntax

 myEvent = new CompositionEvent(typeArg, CompositionEventInit)

Values

typeArg
Is a DOMString representing the name of the event.
CompositionEventInitOptional
A 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.

Specifications

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

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes ?53 Yes No ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes ?53 ? ? ?

See also

Document Tags and Contributors

Contributors to this page: fscholz, vapier, chrisdavidmills
Last updated by: fscholz,