Class: AbstractMenu

AbstractMenu

new AbstractMenu()

Implements:
Source:

Extends

Members

className

Source:

role

Source:

Methods

addAttributes(attributes)

Adds a attributes and values to the HTML element.
Parameters:
Name Type Description
attributes Object.<string, string> A dictionary of attributes.
Inherited From:
Source:

addEvents(element)

Adds navigation events to an HTML element.
Parameters:
Name Type Description
element HTMLElement The HTML element for navigation.
Inherited From:
Source:

bubbleKey()

Bubble this key event.
Inherited From:
Source:

click(event)

Navigation on mouse click events.
Parameters:
Name Type Description
event MouseEvent The mouse event that fired.
Inherited From:
Implements:
Source:

down(event)

Navigation on downwards arrow key pressed.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Overrides:
Implements:
Source:

escape(event)

Navigation on escape key pressed.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Inherited From:
Implements:
Source:

find(id) → (nullable) {Item}

Retrieves a menu item via its id by depth-first search.
Parameters:
Name Type Description
id string The item id.
Implements:
Source:
Returns:
The item if it exists.
Type
Item

focus()

Inherited From:
Source:

generateHtml()

Forces generation of the actual DOM element.
Overrides:
Implements:
Source:

generateMenu()

Generates the HTML element containing the menu entries.
Implements:
Source:

getFocused() → {Item}

Returns the currently focused Item.
Implements:
Source:
Returns:
The focused Item.
Type
Item

getHtml() → {HTMLElement}

Generates the DOM element if it does not yet exists and returns it.
Inherited From:
Implements:
Source:
Returns:
The HTML element associated with this entry.
Type
HTMLElement

getItems() → {Array.<Item>}

Returns the items in that menu.
Implements:
Source:
Returns:
The array of items.
Type
Array.<Item>

getPool() → {VariablePool.<(string|boolean)>}

Implements:
Source:
Returns:
The variable pool associated to this menu.
Type
VariablePool.<(string|boolean)>

isPosted() → {boolean}

Inherited From:
Implements:
Source:
Returns:
True if element is posted in the page.
Type
boolean

keydown(event)

Navigation selection on keyboard events.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Inherited From:
Implements:
Source:

left(event)

Navigation on left arrow key pressed.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Inherited From:
Implements:
Source:

mousedown(event)

Navigation selection on mouse down events.
Parameters:
Name Type Description
event MouseEvent The mouse event that fired.
Inherited From:
Implements:
Source:

mouseout(event)

Navigation selection on mouse out events.
Parameters:
Name Type Description
event MouseEvent The mouse event that fired.
Inherited From:
Implements:
Source:

mouseover(event)

Navigation selection on mouse over events.
Parameters:
Name Type Description
event MouseEvent The mouse event that fired.
Inherited From:
Implements:
Source:

mouseup(event)

Navigation selection on mouse up events.
Parameters:
Name Type Description
event MouseEvent The mouse event that fired.
Inherited From:
Implements:
Source:

parseItem(items)

Parses items in JSON formats and attaches them to the menu.
Parameters:
Name Type Description
items Array.<JSON> List of JSON menu items.
Source:
Returns:

parseItems(items)

Parses items in JSON formats and attaches them to the menu.
Parameters:
Name Type Description
items Array.<JSON> List of JSON menu items.
Source:

post()

Posts the element.
Overrides:
Implements:
Source:
Navigation on right arrow key pressed.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Inherited From:
Implements:
Source:

setFocused(item)

Sets the currently focused Item.
Parameters:
Name Type Description
item Item The new focused Item.
Implements:
Source:

setHtml(element)

Parameters:
Name Type Description
element HTMLElement Sets the HTML Element.
Inherited From:
Implements:
Source:

space(event)

Navigation on space key pressed.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Inherited From:
Implements:
Source:

stop(event)

Stops event propagation and bubbling.
Parameters:
Name Type Description
event Event The keyboard event that fired.
Inherited From:
Source:

unfocus()

Inherited From:
Source:

unpost()

Removes element from page.
Inherited From:
Implements:
Source:

unpostSubmenus()

Unposts all submenus of this menu.
Implements:
Source:

up(event)

Navigation on upwards arrow key pressed.
Parameters:
Name Type Description
event KeyboardEvent The keyboard event that fired.
Overrides:
Implements:
Source: