Package | dom.events |
Class | public class TextEvent |
Inheritance | TextEvent UIEvent Event Object |
Introduced in: | DOM 3 Events |
To create an instance of the TextEvent interface, use the DocumentEvent.createEvent("TextEvent") method call.
See also
Property | Defined By | ||
---|---|---|---|
DOM 2 Events bubbles : Boolean [read-only]
Used to indicate whether or not an event is a bubbling event. | Event | ||
DOM 2 Events cancelable : Boolean [read-only]
Indicates whether the event is cancelable or not. | Event | ||
DOM 2 Events currentTarget : EventTarget [read-only]
Identifies the current target for the event, as the event traverses the DOM. | Event | ||
DOM 3 Events data : DOMString [read-only]
Holds the value of the characters generated by the character device. | TextEvent | ||
DOM 3 Events defaulPrevented : Boolean [read-only]
Used to indicate whether Event.preventDefault() has been called for
this event. | Event | ||
DOM 2 Events detail : Number [read-only]
Specifies some detail information about the Event, depending
on the type of event. | UIEvent | ||
DOM 2 Events eventPhase : Number [read-only]
Used to indicate which phase of event flow is currently being accomplished. | Event | ||
Non-Standard explicitOriginalTarget : nsIDOMEventTarget [read-only]
The explicit original target of the event. | Event | ||
Non-Standard isChar : Boolean [read-only]
Returns a boolean indicating whether the event produced a key character or not. | UIEvent | ||
Non-Standard isTrusted : Boolean [read-only]
Determines if the event was from the user or script generated. | Event | ||
Non-Standard layerX : Number [read-only]
Returns the horizontal coordinate of the event relative to the current layer. | UIEvent | ||
Non-Standard layerY : Number [read-only]
Returns the vertical coordinate of the event relative to the current layer. | UIEvent | ||
DOM 3 Events namespaceURI : DOMString [read-only]
The namespace URI associated with this event at initialization time, or
null if it is unspecified. | Event | ||
Non-Standard originalTarget : * [read-only]
The original target of the event before any retargetings. | Event | ||
Non-Standard pageX : Number [read-only]
Returns the horizontal coordinate of the event relative to whole document. | UIEvent | ||
Non-Standard pageY : Number [read-only]
Returns the vertical coordinate of the event relative to the whole document. | UIEvent | ||
DOM 2 Events target : EventTarget [read-only]
Used to indicate the event target. | Event | ||
DOM 2 Events timeStamp : DOMTimeStamp [read-only]
Used to specify the time at which the event was created in milliseconds
relative to 1970-01-01T00:00:00Z. | Event | ||
DOM 2 Events type : DOMString [read-only]
The local name of the event type. | Event | ||
DOM 2 Events view : AbstractView [read-only]
Returns the AbstractView object from which the event was generated. | UIEvent | ||
Non-Standard which : DOMString [read-only]
Returns the numeric keyCode of the key pressed, or the character code (charCode) for
an alphanumeric key pressed. | UIEvent |
Method | Defined By | ||
---|---|---|---|
Initializes attributes of an Event created through the
DocumentEvent.createEvent method. | Event | ||
DOM 3 Events initEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean):void
Initializes attributes of an Event object. | Event | ||
DOM 3 Events initTextEvent(typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, viewArg:AbstractView, dataArg:DOMString):void
Initializes attributes of a TextEvent object. | TextEvent | ||
DOM 3 Events initTextEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, viewArg:AbstractView, dataArg:DOMString):void
Initializes attributes of a TextEvent object. | TextEvent | ||
DOM 2 Events initUIEvent(typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, viewArg:AbstractView, detailArg:Number):void
Initializes attributes of an UIEvent object. | UIEvent | ||
DOM 3 Events initUIEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, viewArg:AbstractView, detailArg:Number):void
Initializes attributes of an UIEvent object. | UIEvent | ||
Obsolete preventBubble():void
Prevents the event from bubbling. | Event | ||
Obsolete preventCapture():void
This method is deprecated in favor of standard stopPropagation and is removed in Gecko 1.9. | Event | ||
DOM 2 Events preventDefault():void
Cancels the event if it is cancelable, without stopping further propagation of the event. | Event | ||
DOM 3 Events stopImmediatePropogation():void
Prevents other event listeners from being triggered and, unlike
Event.stopPropagation() its effect is immediate . | Event | ||
DOM 2 Events stopPropogation():void
Prevents other event listeners from being triggered but its effect is
deferred until all event listeners attached on the Event.currentTarget
have been triggered . | Event |
Constant | Defined By | ||
---|---|---|---|
HTML 4.0 abort : String = abort [static]
Loading of a resource has been aborted. | UIEvent | ||
DOM 2 Events AT_TARGET : Number = 2 [static]
The current event is in the target phase, i.e. | Event | ||
DOM 2 Events blur : String = blur [static]
An event target loses focus. | UIEvent | ||
DOM 2 Events BUBBLING_PHASE : Number = 3 [static]
The current event phase is the bubbling phase. | Event | ||
DOM 2 Events CAPTURING_PHASE : Number = 1 [static]
The current event phase is the capture phase. | Event | ||
HTML 4.0 change : String = change [static]
A control loses the input focus and its value has been modified since gaining focus. | UIEvent | ||
DOM 2 Events DOMActivate : String = DOMActivate [static]
Refer to Activation requests and behavior. | UIEvent | ||
DOM 2 Events DOMFocusIn : String = DOMFocusIn [static]
An event target receives focus. | UIEvent | ||
DOM 2 Events DOMFocusOut : String = DOMFocusOut [static]
An event target loses focus. | UIEvent | ||
HTML 4.0 error : String = error [static]
A resource failed to load, or has been loaded but cannot be interpreted according to its semantics
such as an invalid image, a script execution error, or non-well-formed XML. | UIEvent | ||
DOM 2 Events focus : String = focus [static]
An event target receives focus. | UIEvent | ||
HTML 4.0 load : String = load [static]
The DOM Implementation finishes loading the resource (such as the document) and any dependent resources
(such as images, style sheets, or scripts). | UIEvent | ||
HTML 4.0 reset : String = reset [static]
A form, such as a [HTML 4.01] or [XHTML 1.0] form, is reset. | UIEvent | ||
DOM 2 Events resize : String = resize [static]
A document view or an element has been resized. | UIEvent | ||
DOM 2 Events scroll : String = scroll [static]
A document view or an element has been scrolled. | UIEvent | ||
HTML 4.0 select : String = select [static]
A user selects some text. | UIEvent | ||
HTML 4.0 submit : String = submit [static]
A form, such as a [HTML 4.01] or [XHTML 1.0] form, is submitted. | UIEvent | ||
DOM 3 Events textInput : String = textInput [static]
One or more characters have been entered. | TextEvent | ||
HTML 4.0 unload : String = unload [static]
The DOM implementation removes from the environment the resource (such as the document) or any dependent
resources (such as images, style sheets, scripts). | UIEvent |
DOM 3 Events data | property |
data:DOMString
[read-only] Introduced in: | DOM 3 Events |
Holds the value of the characters generated by the character device. This may be a single Unicode character or a non-empty sequence of Unicode characters [Unicode]. Characters should be normalized as defined by the Unicode normalization form NFC, defined in [UAX #15]. This attribute cannot be null or contain the empty string.
public function get data():DOMString
See also
DOM 3 Events initTextEvent | () | method |
public function initTextEvent(typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, viewArg:AbstractView, dataArg:DOMString):void
Introduced in: | DOM 3 Events |
Initializes attributes of a TextEvent object. This method has the same behavior as UIEvent.initUIEvent(). The value of UIEvent.detail remains undefined.
Parameters
typeArg:DOMString — Specifies Event.type, the local name of the event type.
| |
canBubbleArg:Boolean — Specifies Event.bubbles. This parameter overrides the intrinsic bubbling behavior of the event.
| |
cancelableArg:Boolean — Specifies Event.cancelable. This parameter overrides the intrinsic cancelable behavior of the event.
| |
viewArg:AbstractView — Specifies UIEvent.view. This value may be null.
| |
dataArg:DOMString — Specifies TextEvent.data.
|
See also
DOM 3 Events initTextEventNS | () | method |
public function initTextEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, viewArg:AbstractView, dataArg:DOMString):void
Introduced in: | DOM 3 Events |
Initializes attributes of a TextEvent object. This method has the same behavior as UIEvent.initUIEventNS(). The value of UIEvent.detail remains undefined.
Parameters
namespaceURIArg:DOMString — Specifies Event.namespaceURI, the namespace URI associated with this event, or null if no namespace.
| |
typeArg:DOMString — Specifies Event.type, the local name of the event type.
| |
canBubbleArg:Boolean — Specifies Event.bubbles. This parameter overrides the intrinsic bubbling behavior of the event.
| |
cancelableArg:Boolean — Specifies Event.cancelable. This parameter overrides the intrinsic cancelable behavior of the event.
| |
viewArg:AbstractView — Specifies UIEvent.view. This value may be null.
| |
dataArg:DOMString — Specifies TextEvent.data.
|
See also
DOM 3 Events textInput | Constant |
public static const textInput:String = textInput
Introduced in: | DOM 3 Events |
One or more characters have been entered.
The characters can originate from a variety of sources. For example, it could be characters resulting from a key being pressed or released on a keyboard device, characters resulting from the processing of an input method editor, or resulting from a voice command. Where a "paste" operation generates a simple sequence of characters, i.e. a text without any structure or style information, this event type should be generated as well.
Title | Value |
---|---|
Cancelable | Yes |
Bubbles | Yes |
Target | Element |
Context info | UIEvent.view and TextEvent.data are in use. |
See also