CompositionEvent
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("UI Events")}}
The DOM **CompositionEvent** represents events that occur due to the user indirectly entering text.
{{InheritanceDiagram}}
Constructor
- {{domxref("CompositionEvent.CompositionEvent()", "CompositionEvent()")}}
- : Creates a new
CompositionEventobject instance.
Instance properties
_This interface also inherits properties of its parent, {{domxref("UIEvent")}}, and its ancestor — {{domxref("Event")}}._
- {{domxref("CompositionEvent.data")}} {{ReadOnlyInline}}
- : Returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the
CompositionEventobject. - {{domxref("CompositionEvent.locale")}} {{ReadOnlyInline}} {{deprecated_inline}} {{Non-standard_Inline}}
- : Returns the locale of the current input method (for example, the keyboard layout locale if the composition is associated with an {{glossary("Input method editor")}}).
Instance methods
_This interface also inherits methods of its parent, {{domxref("UIEvent")}}, and its ancestor — {{domxref("Event")}}._
- {{domxref("CompositionEvent.initCompositionEvent()")}} {{deprecated_inline}}
- : Initializes the attributes of a
CompositionEventobject.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}