Class: Event

hui. Event


new Event(event)

Wrapper for events

Parameters:
Name Type Description
event Event

The DOM event

Source:

Members


altKey

If the alt key was pressed

Source:

backspaceKey

If the backspace was pressed

Source:

downKey

If the down key was pressed

Source:

element

The target element

Source:

escapeKey

If the escape key was pressed

Source:

event

The event

Source:

keyCode

The key code

Source:

leftKey

If the left key was pressed

Source:

metaKey

If the command key was pressed

Source:

returnKey

If the return key was pressed

Source:

rightKey

If the right key was pressed

Source:

shiftKey

If the shift key was pressed

Source:

spaceKey

If the space key was pressed

Source:

upKey

If the up key was pressed

Source:

Methods


findByClass(cls)

Finds the nearest ancester with a certain class name

Parameters:
Name Type Description
cls

The css class name

Source:
Returns:

The found element or null

Type
Element

findByTag(tag)

Finds the nearest ancester with a certain tag name

Parameters:
Name Type Description
tag

The tag name

Source:
Returns:

The found element or null

Type
Element

getElement()

Get the node the event originates from

Source:
Returns:

The originating element

Type
ELement

getLeft()

Get the left coordinate

Source:
Returns:

The left coordinate

Type
Number

getTop()

Get the top coordinate

Source:
Returns:

The top coordinate

Type
Number

stop()

Stops the event from propagating

Source: