CompositionEvent Interface
nsIDOMUIEvent
Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6)
The DOM CompositionEvent
represents events that occur due to the user indirectly entering text.
Extends
Methods
Code void initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) #
Initializes the attributes of a composition event.
Parameters
typeArg
- The type of composition event; this will be one of
compositionstart
,compositionupdate
, orcompositionend
. canBubbleArg
- Whether or not the event can bubble.
cancelableArg
- Whether or not the event can be canceled.
viewArg
- ?
dataArg
- The value of the
data
attribute. localeArg
- The value of the
locale
attribute.
void initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg);
Fields
Code final String data #
For compositionstart
events, this is the currently selected text that will be replaced by the string being composed. This value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started.
For compositionupdate
, this is the string as it stands currently as editing is ongoing.
For compositionend
events, this is the string as committed to the editor.
Read only.
final String data;
This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.