Alloy UI

event  1.0.1

 
Filters

Class DOMEventFacade

Wraps a DOM event, properties requiring browser abstraction are fixed here. Provids a security layer when required.

Properties

_event - object

The native event

button - int

The button that was pushed.

charCode - int

The charCode for key events. Same as keyCode

currentTarget - Node

Node reference for the element that the listener was attached to.

keyCode - int

The keyCode for key events. Uses charCode if keyCode is not available

pageX - int

The X location of the event on the page (including scroll)

pageY - int

The Y location of the event on the page (including scroll)

relatedTarget - Node

Node reference to the relatedTarget

target - Node

Node reference for the targeted element

wheelDelta - int

Number representing the direction and velocity of the movement of the mousewheel. Negative is down, the higher the number, the faster. Applies to the mousewheel event.

which - int

The button that was pushed. Same as button.

Methods

halt

void halt ( immediate )
Stops the event propagation and prevents the default event behavior.
Parameters:
immediate <boolean> if true additional listeners on the current target will not be executed

preventDefault

void preventDefault ( returnValue )
Prevents the event's default behavior
Parameters:
returnValue <string> sets the returnValue of the event to this value (rather than the default false value). This can be used to add a customized confirmation query to the beforeunload event).

stopImmediatePropagation

void stopImmediatePropagation ( )
Stops the propagation to the next bubble target and prevents any additional listeners from being exectued on the current target.

stopPropagation

void stopPropagation ( )
Stops the propagation to the next bubble target