MDN self-hosted library · e01.org

CompositionEvent

UI Events

no runnable cells web-api-interface upstream source

UI Events

The DOM CompositionEvent represents events that occur due to the user indirectly entering text.

Constructor

  • CompositionEvent()
  • : Creates a new CompositionEvent object instance.

Instance properties

This interface also inherits properties of its parent, UIEvent, and its ancestor — Event.

  • CompositionEvent.data
  • : Returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the CompositionEvent object.
  • CompositionEvent.locale
  • : Returns the locale of the current input method (for example, the keyboard layout locale if the composition is associated with an Input method editor).

Instance methods

This interface also inherits methods of its parent, UIEvent, and its ancestor — Event.

  • CompositionEvent.initCompositionEvent()
  • : Initializes the attributes of a CompositionEvent object.

Specifications

Browser compatibility

See also