Provides cross-browser access to DOM event properties and helper APIs that are used to attach handlers to DOM element events.
Initializes a new instance of the Sys.UI.DomEvent class and associates it with the specified DomElement object.
The DomElement object to associate with the event.
Gets a Boolean value that indicates the state of the ALT key when the associated event occurred. Use the altKey field to determine whether the ALT key is pressed when the event occurred.
Gets a Sys.UI.MouseButton enumeration value that indicates the button state of the mouse when the related event occurred. Use the button field to determine which mouse button was pressed when the related event occurred.
Gets the character code of the key that raised the associated keyPress event. Use the charCode field to get the character code of a pressed key or key combination that raised a keyPress event. The keyPress event provides a single character code that identifies key combinations. The keyPress event is not raised for single modifier keys such as ALT, CTRL, and SHIFT.
Gets the x-coordinate of the mouse pointer's position relative to the client area of the browser window, excluding window scroll bars.
Gets the y-coordinate of the mouse pointer's position relative to the client area of the browser window, excluding window scroll bars.
Gets a Boolean value that indicates the state of the CTRL key when the associated event occurred.
Gets the key code of the key that raised the keyUp or keyDown event.
Gets the x-coordinate of the mouse pointer's position relative to the object that raised the event.
Gets the y-coordinate of the mouse pointer's position relative to the object that raised the event.
Gets the x-coordinate of the mouse pointer's position relative to the user's screen.
Gets the y-coordinate of the mouse pointer's position relative to the user's screen.
Gets a Boolean value that indicates the state of the SHIFT key when the associated event occurred.
Gets the object that the event acted on.
Gets the name of the event that was raised.
Provides a method to add a DOM event handler to the DOM element that exposes the event. This member is static and can be invoked without creating an instance of the class. Use the addHandler method to add a DOM event handler to the element that exposes the event. The eventName parameter should not include the "on" prefix. For example, specify "click" instead of "onclick". This method can be accessed through the $addHandler shortcut method.
The element that exposes the event.
The name of the event.
The client function that is called when the event occurs.
(Optional) A boolean value that determines whether the handler should be removed automatically when the element is disposed.
Adds a list of DOM event handlers to the DOM element that exposes the events. This member is static and can be invoked without creating an instance of the class. Use the addHandlers method to add a list of DOM event handlers to the element that exposes the event. The events parameter takes a comma-separated list of name/value pairs in the format name:value, where name is the name of the DOM event and value is the name of the handler function. If there is more than one name/value pair, the list must be enclosed in braces ({}) to identify it as a single parameter. Multiple name/value pairs are separated with commas. Event names should not include the "on" prefix. For example, specify "click" instead of "onclick". If handlerOwner is specified, delegates are created for each handler. These delegates are attached to the specified object instance, and the this pointer from the delegate handler will refer to the handlerOwner object. This method can be accessed through the $addHandlers shortcut method.
The DOM element that exposes the events.
A dictionary of event handlers.
(Optional) The object instance that is the context for the delegates that should be created from the handlers.
(Optional) A boolean value that determines whether the handler should be removed automatically when the element is disposed.
Removes all DOM event handlers from a DOM element that were added through the Sys.UI.DomEvent addHandler or the Sys.UI.DomEvent addHandlers methods. This member is static and can be invoked without creating an instance of the class. This method can be accessed through the $clearHandlers shortcut method.
The element that exposes the events.
Prevents the default DOM event action from happening. Use the preventDefault method to prevent the default event action for the browser from occurring. For example, if you prevent the keydown event of an input element from occurring, the character typed by the user is not automatically appended to the input element's value.
Removes a DOM event handler from the DOM element that exposes the event. This member is static and can be invoked without creating an instance of the class.
The element that exposes the event.
The name of the event.
The event handler to remove.
Prevents an event from being propagated (bubbled) to parent elements. By default, event notification is bubbled from a child object to parent objects until it reaches the document object. The event notification stops if the event is handled during the propagation process. Use the stopPropagation method to prevent an event from being propagated to parent elements.