public interface CompositionEvent extends UIEvent
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.
AT_TARGET, BEFORECOPY, BEFORECUT, BEFOREPASTE, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTEXTMENU, COPY, CUT, DBLCLICK, DRAG, DRAGEND, DRAGENTER, DRAGLEAVE, DRAGOVER, DRAGSTART, DROP, ERROR, FOCUS, FOCUSIN, FOCUSOUT, INPUT, INVALID, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP, MOUSEWHEEL, NONE, PASTE, RESIZE, SCROLL, SELECTSTART, SUBMIT, TOUCHCANCEL, TOUCHEND, TOUCHMOVE, TOUCHSTART, WEBKITANIMATIONEND, WEBKITANIMATIONITERATION, WEBKITANIMATIONSTART, WEBKITTRANSITIONEND
Modifier and Type | Method and Description |
---|---|
String |
getData()
For
compositionstart
events, this is the currently selected text that will be replaced by the string being composed. |
void |
initCompositionEvent(String typeArg,
boolean canBubbleArg,
boolean cancelableArg,
Window viewArg,
String dataArg)
Initializes the attributes of a composition event.
|
getCharCode, getDetail, getKeyCode, getLayerX, getLayerY, getPageX, getPageY, getView, getWhich, initUIEvent
getClipboardData, getCurrentTarget, getEventPhase, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isBubbles, isCancelable, isCancelBubble, isDefaultPrevented, isReturnValue, preventDefault, setCancelBubble, setReturnValue, stopImmediatePropagation, stopPropagation
String getData()
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.
void initCompositionEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, Window viewArg, String dataArg)
Initializes the attributes of a composition event.
typeArg
compositionstart
, compositionupdate
, or compositionend
.canBubbleArg
cancelableArg
viewArg
dataArg
data
attribute.localeArg
locale
attribute.Copyright © 2016. All rights reserved.