Package: | Roo |
Defined In: | Roo/EventManager.js. |
Class: | EventObject |
function handleClick(e){ // e is not a standard event object, it is a Roo.EventObject
e.preventDefault();
var target = e.getTarget();
...
}
var myDiv = Roo.get("myDiv");
myDiv.on("click", handleClick);
//or
Roo.EventManager.on("myDiv", 'click', handleClick);
Roo.EventManager.addListener("myDiv", 'click', handleClick);
Method | Defined By | |
---|---|---|
Roo.EventObject.getCharCode
()
:
Number
Gets the key code for the event.
Gets the key code for the event.
|
Roo.EventObject | |
Roo.EventObject.getKey
()
:
Number
Returns a normalized keyCode for the event.
Returns a normalized keyCode for the event.
|
Roo.EventObject | |
Roo.EventObject.getPageX
()
:
Number
Gets the x coordinate of the event.
Gets the x coordinate of the event.
|
Roo.EventObject | |
Roo.EventObject.getPageY
()
:
Number
Gets the y coordinate of the event.
Gets the y coordinate of the event.
|
Roo.EventObject | |
Roo.EventObject.getRelatedTarget
()
:
HTMLElement
Gets the related target.
Gets the related target.
|
Roo.EventObject | |
Roo.EventObject.getTarget
(String selector, Number/String/HTMLElement/Element maxDepth, Boolean returnEl)
:
HTMLelement
Gets the target for the event.
Gets the target for the event.
|
Roo.EventObject | |
Roo.EventObject.getTime
()
:
Number
Gets the time of the event.
Gets the time of the event.
|
Roo.EventObject | |
Roo.EventObject.getWheelDelta
()
:
Number
Normalizes mouse wheel delta across browsers
Normalizes mouse wheel delta across browsers
|
Roo.EventObject | |
Roo.EventObject.getXY
()
:
Array
Gets the page coordinates of the event.
Gets the page coordinates of the event.
|
Roo.EventObject | |
Roo.EventObject.hasModifier
()
:
Boolean
Returns true if the control, meta, shift or alt key was pressed during this event.
Returns true if the control, meta, shift or alt key was pressed during this event.
|
Roo.EventObject | |
Roo.EventObject.preventDefault
()
Prevents the browsers default handling of the event.
Prevents the browsers default handling of the event.
|
Roo.EventObject | |
Roo.EventObject.stopEvent
()
Stop the event (preventDefault and stopPropagation)
Stop the event (preventDefault and stopPropagation)
|
Roo.EventObject | |
Roo.EventObject.stopPropagation
()
Cancels bubbling of the event.
Cancels bubbling of the event.
|
Roo.EventObject | |
Roo.EventObject |