Encapsulates input event information for an event that propagates through a container and control hierarchy.
Implements W3C standard event handling. This object is passed to a function that you register to respond to events of a certain type that occur in a window or control. Use windowObj.addEventListener() or controlObj.addEventListener() to register a handler function.
Go to Property Listing | Method Listing
UIEvent, initEvent, initUIEvent, preventDefault, stopPropagation
Property |
Type |
Access |
Description |
---|---|---|---|
readonly |
True if the event is of a type that bubbles. |
||
readonly |
True if the default action associated with the event can be canceled with preventDefault(). |
||
readonly |
True if this event can be captured. |
||
readonly |
The event target object which is currently handling the event. During capturing and bubbling, this is different from the property target. |
||
VariesSUI |
readonly |
The click count for a mouse-click event. |
|
readonly |
The current phase of event propagation; one of none, target, capture, bubble. |
||
readonly |
The event target object for this event. |
||
DateSUI |
readonly |
The date and time at which the event occurred. |
|
readonly |
The name of the event that this object represents. Event types are listed in the JavaScript Tools Guide. |
||
VariesSUI |
readonly |
The ScriptUI element that this event relates to. |
Constructor
UIEvent (SUI) UIEvent (type:String, captures:Boolean=Boolean, bubbles:Boolean=Boolean, [view:Object], [detail:Number])
Creates an event.
The UIEvent object is normally created by ScriptUI and passed to your event handler. However, you can simulate a user action by constructing an event object and sending it to a target object’s dispatchEvent() function.
Parameter |
Type |
Description |
---|---|---|
type |
The event type. See UIEvent.type property. |
|
captures |
Set to true if this event can be captured. (default: false) |
|
bubbles |
Set to true if the event bubbles. (default: false) |
|
view |
The ScriptUI element that this event relates to. |
|
detail |
The click count for a mouse-click event. |
undefined initEvent (type:String, captures:Boolean=Boolean, bubbles:Boolean=Boolean, cancelable:Boolean=Boolean)
Initializes a UI event as a core W3C event.
Parameter |
Type |
Description |
---|---|---|
type |
The event type. |
|
captures |
Set to true if this event can be captured. (default: false) |
|
bubbles |
Set to true if the event bubbles. (default: false) |
|
cancelable |
Set to true if the default action is cancelable. (default: false) |
undefined initUIEvent (type:String, captures:Boolean=Boolean, bubbles:Boolean=Boolean, [view:Object], [detail:Number])
Initializes an event.
Parameter |
Type |
Description |
---|---|---|
type |
The event type. |
|
captures |
Set to true if this event can be captured. (default: false) |
|
bubbles |
Set to true if the event bubbles. (default: false) |
|
view |
The ScriptUI element that this event relates to. |
|
detail |
The click count for a mouse-click event. |
undefined preventDefault ()
Prevents the default action associated with this event from being called.
undefined stopPropagation ()
Stops the propagation of this event.