DomEvent Class

Provides access to client event handlers and event properties.

Namespace: Sys.UI

Base Types

System.Object

Constructors

Name Description
DomEvent(HtmlElement)

Methods

Name Description
addHandler(HtmlElement, string, DomEventHandler) Adds a DOM event handler to the element that exposes the event.
addHandler(Type, string, DomEventHandler) Adds a DOM event handler to a singleton object represented by a type. (Eg. Window and Document)
addHandlers(HtmlElement, JsObject) Adds a list of DOM event handlers to the element that exposes the event.
addHandlers(Type, JsObject) Adds a list of DOM event handler to a singleton object represented by a type. (Eg. Window and Document)
addHandlers(HtmlElement, JsObject, object) Adds a list of DOM event handlers to the element that exposes the event.
addHandlers(Type, JsObject, object) Adds a list of DOM event handlers to a singleton object represented by a type. (Eg. Window and Document)
clearHandlers(HtmlElement) Removes all event handlers from the specified element.
preventDefault() Prevents the default event action from happening.
removeHandler(HtmlElement, string, DomEventHandler) Removes a DOM event handler from the element that exposes the event.
removeHandler(Type, string, DomEventHandler) Removes a DOM event handler from the singleton object represented by a type. (Eg. Window and Document)
stopPropagation() Prevents an event from being propagated (bubbled) to parent elements.

Properties

Name Description
altKey Gets a Boolean value that indicates the state of the ALT key when the associated event occurred.
button Gets a enumeration value that indicates the button state of the mouse when the related event occurred.
charCode Gets the character code of the key that raised the associated event.
clientX Gets the x-coordinate of the mouse pointer's position relative to the client area of the browser window, excluding window scroll bars.
clientY Gets the y-coordinate of the mouse pointer's position relative to the client area of the browser window, excluding window scroll bars.
ctrlKey Gets a Boolean value that indicates the state of the CTRL key when the associated event occurred.
keyCode
offsetX Gets the x-coordinate of the mouse pointer's position relative to the object that raised the event.
offsetY Gets the y-coordinate of the mouse pointer's position relative to the object that raised the event.
rawEvent
screenX Gets the x-coordinate of the mouse pointer's position relative to the screen top left.
screenY Gets the y-coordinate of the mouse pointer's position relative to the screen top left.
shiftKey Gets a value that indicates the state of the SHIFT key when the associated event occurred.
target Gets the object that the event acted upon.
type Gets the name of the event that was raised.
© Copyright 2005-2011 SharpKit. All rights reserved.