# UIEvent : Event
Return to: HTML DOM Level 2 index

Provides contextual information associated with User Interface-related events.

## Platform Support

IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | ---
no | 1.0+ | 7.0+ | 7.0+ | 1.0+

## Constructors

Constructor | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
UIEvent Constructor() : UIEvent Provides contextual information associated with User Interface-related events. | Show Details | no | 1.0+ | 7.0+ | 7.0+ | 1.0+

### UIEvent() : UIEvent

Provides contextual information associated with User Interface-related events.

Returns

UIEvent |

Visibility
  internal

## Inherited Properties

Property | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
Abstract : String Specifies the Abstract content of the entry banner for an ASX file. | No Details | 6.0+ | no | no | no | no

altKey : Boolean If true, the ALT key is currently being pressed. | Show Details | 6.0+ | 1.75+ | no | no | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

altLeft : Boolean If true, the left ALT key is currently being pressed. | Show Details | 6.0+ | no | no | no | no

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

Banner : String Specifies the Banner content of the entry for an ASX file. | No Details | 6.0+ | no | no | no | no

bubbles : Boolean Specify true if the event type bubbles. Otherwise, false. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

Remarks
  A bubbling event will continue unless `stopPropagation()` is called on the event.
Availability

  HTML DOM Level 2|W3C

button : Number Specifies the mouse button that was clicked. Valid values are 0 = No button pressed. 1 = Left button pressed. 2 = Right button pressed. 3 = Left and right buttons both pressed. 4 = Middle button pressed. 5 = Left and middle buttons pressed. 6 = Right and middle buttons are both pressed. 7 = All three buttons pressed. | No Details | 5.0+ | no | no | no | no

cancelable : Boolean True if the action of the event can be cancelled with the preventDefault()method. Otherwise, false. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

Availability

  HTML DOM Level 2|W3C

cancelBubble : Boolean If true, bubbling is disabled for the event. | No Details | 5.0+ | no | no | no | no

clientX : Number Specifies the x-coordinate (in pixels) of the mouse relative to the client window. | Show Details | 4.0+ | 1.75 | no | 8.0+ | 1.2

- Safari: Gives position relative to the document.

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

clientY : Number Specifies the y-coordinate (in pixels) of the mouse relative to the client window. | Show Details | 4.0+ | 1.75 | no | 8.0+ | 1.2

- Safari: Gives position relative to the document.

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

contentOverflow : Boolean If true, overflow content should be formatted using a new LayoutRect object. | No Details | 6.0+ | no | no | no | no

ctrlKey : Boolean If true, the CTRL key is currently being pressed. | Show Details | 5.0+ | 1.75 | no | 8.0+ | 1.2

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

ctrlLeft : Boolean If true, the left CTRL key is currently being pressed. | Show Details | 6.0+ | no | no | no | no

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

currentTarget : EventTarget Node of the Document that is handling the event. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/targets.html

Remarks
  During the capturing and bubbling phases of event processing, the `Event` object will be passed around to various `EventListener`s. The value of this property will point to the `EventTarget` `Node` within the DOM where this `Event` is currently being evaluated.
Availability

  HTML DOM Level 2|W3C

dataFld : String Specifies the data column in the current recordset. | No Details | 6.0+ | no | no | no | no

eventPhase : Number Phase that the event is currently in. See Remarks for a list of valid values. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

Remarks

  The following constants are valid values for `eventPhase`:

  - `CAPTURING_PHASE = 1` - Indicates that the event is in the capturing phase.
  - `AT_TARGET = 2` - Indicates that the event is being handled by its target node.
  - `BUBBLING_PHASE = 3` - Indicates that the event is bubbling.
Availability

  HTML DOM Level 2|W3C

fromElement : Element Specifies the element that was the previous location of the pointer or cursor. | Show Details | 5.0+ | no | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/targets.html

keyCode : Number Specifies the Unicode key code for the event.. | Show Details | 6.0+ | 1.75+ | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

MoreInfo : Number Specifies the MoreInfo content of the entry banner for an ASX file. | No Details | 6.0+ | no | no | no | no

nextPage : String Specifies position of the next page for printing. Valid values are | No Details | 6.0+ | no | no | no | no

nextPage : String Specifies position of the next page for printing. Valid values are "left", "right", and "". | No Details | 6.0+ | no | no | no | no

offsetX : Number Specifies the x-coordinate (in pixels) of the mouse relative to the object that is firing the event. | Show Details | 5.0+ | no | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

offsetY : Number Specifies the y-coordinate (in pixels) of the mouse relative to the object that is firing the event. | Show Details | 5.0+ | no | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

propertyName : String Specifies the name of the property whose value changes. | No Details | 5.0+ | no | no | no | no

qualifier : String Specifies the name of the data member from the data source. | No Details | 5.0+ | no | no | no | no

reason : Number Specifies the result of a data transfer for a data source. Valid values are 0 = success, 1 = transfer aborted, 2 = error. | No Details | 5.0+ | no | no | no | no

recordSet : Number Specifies the result of a data transfer for a data source. Valid values are 0 = success, 1 = transfer aborted, 2 = error. | No Details | 5.0+ | no | no | no | no

repeat : Boolean If true, specifies that the onkeydown event was repeated. | Show Details | 6.0+ | no | no | no | no

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

returnValue : Boolean If true, the value from the event is returned. | No Details | 6.0+ | no | no | no | no

saveType : String Specifies either "TEXT" or "HTML" as the clipboard type when the oncontentsave event fires. | No Details | 6.0+ | no | no | no | no

screenX : Number Specifies the x-coordinate (in pixels) of the mouse relative to the screen. | Show Details | 5.0+ | 1.75+ | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

screenY : Number Specifies the y-coordinate (in pixels) of the mouse relative to the screen. | Show Details | 5.0+ | 1.75+ | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

shiftKey : Boolean If true, the SHIFT key is currently being pressed. | Show Details | 5.0+ | 1.75+ | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

shiftLeft : Boolean If true, the left SHIFT key is currently being pressed. | Show Details | 6.0+ | no | no | no | no

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/keys.html

srcElement : Element Element that fired or received the event. | Show Details | 5.0+ | no | no | 8.0+ | 1.2+

- IE: Partial support.

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/targets.html

srcFilter : Object Object that caused the onfilterchange event to fire. | No Details | 5.0+ | no | no | no | no

srcURN : String Specifies the URN for the behavior that fired the event. | No Details | 5.0+ | no | no | no | no

target : EventTarget Target node for the event. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/targets.html

Remarks
  Tracks the `EventTarget` that this event originated from. This is a `Node` that implements the necessary methods to function as a target for DOM events, and can be used as such.
Availability

  HTML DOM Level 2|W3C

timeStamp : Date Date and time that the event occurred. | Show Details | no | 1.75+ | no | no | 1.2+

- Mozilla: Does not work on a "click" event.

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/timestamp.html

Availability

  HTML DOM Level 2|W3C

toElement : Element Specifies the element that the mouse pointer is moving toward. | Show Details | 5.0+ | no | no | 8.0+ | 1.2+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/targets.html

type : String Type of event. | Show Details | 4.0+ | 1.0+ | 4.0+ | 7.0+ | 1.0+

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/targets.html

Remarks
  Not case sensitive.
Availability

  HTML DOM Level 2|W3C

userName : String Specifies the sFriendlyName parameter for the useService method. | No Details | 6.0+ | no | no | no | no

wheelData : Number Specifies distance and direction that the mouse wheel has scrolled. | No Details | 6.0+ | no | no | no | no

x : Number Specifies the x-coordinate (in pixels) of the mouse relative to the parent element. | Show Details | 5.0+ | no | 4.0 | no | 1.3

- IE: Equivalent to "clientX" on Mac.
- Safari: Equivalent to "clientX".
- Netscape: Equivalent to "layerX".

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

y : Number Specifies the y-coordinate (in pixels) of the mouse relative to the parent element. | Show Details | 5.0+ | no | 4.0 | no | 1.3

- IE: Equivalent to "clientY" on Mac.
- Safari: Equivalent to "clientY".
- Netscape: Equivalent to "layerY".

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/mouseposition.html

## Properties

Property | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
detail : Number Numeric detail related to the event. | Show Details | no | 1.75+ | 7.0+ | no | 1.0+

- Mozilla: Incorrect on Windows.

  For examples, see the quirksmode test page:

  http://www.quirksmode.org/js/events/detail.html

Availability

  HTML DOM Level 2|W3C

view : AbstractView Window that generated the event. | Show Details | no | 1.0+ | 7.0+ | 7.0+ | 1.0+

Availability

  HTML DOM Level 2|W3C

## Inherited Functions

Method | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
initEvent(String eventTypeArg, Boolean canBubbleArg, Boolean cancelableArg) : void Initializes the properties of an Event. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

Parameters

String | eventTypeArg | Type of event.
Boolean | canBubbleArg | Specify "true" if the event will bubble.
Boolean | cancelableArg | Specify "true" if the preventDefault() method can cancel the event.

Returns

void |

Availability

  HTML DOM Level 2|W3C

preventDefault() : void Prevents the default action for the event. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

Returns

void |

Remarks
  If the `cancelable` property for the event is set to false, the event either has no default action, or the `preventDefault` method will not be able to prevent the default action.
Availability

  HTML DOM Level 2|W3C

stopPropagation() : void Stops the propagation of an event. | Show Details | no | 1.0+ | 4.0+ | 7.0+ | 1.0+

Returns

void |

Remarks
  Prevents the event from being dispatched to other nodes. Does not prevent other event callers from being called on the node.
Availability

  HTML DOM Level 2|W3C

## Functions

Method | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
initUIEvent(String typeArg, Boolean canBubbleArg, Boolean cancelableArg, AbstractView viewArg, Number detailArg) : void Sets the initial property values for a new UIEvent object. | Show Details | no | 1.0+ | 7.0+ | 7.0+ | 1.0+

Parameters

String | typeArg | Type of event.
Boolean | canBubbleArg | If true, the event should bubble by default.
Boolean | cancelableArg | If true, the event is cancellable by default.
AbstractView | viewArg | Window or frame for the event.
Number | detailArg | Code for the event detail.

Returns

void |

Availability

  HTML DOM Level 2|W3C

## References

Event|MouseEvent

## Availability

HTML DOM Level 2|W3C

text_javascript aptana_docs