BaseMenuItem

BaseMenuItem

A basic navigation link contained inside of a BaseMenu.

Constructor

new BaseMenuItem(options)

Description:
  • Constructs the menu item.

Source:
Parameters:
Name Type Description
options object

The options for generating the menu item.

Properties
Name Type Attributes Default Description
menuItemElement HTMLElement

The menu item in the DOM.

menuLinkElement HTMLElement

The menu item's link in the DOM.

parentMenu BaseMenu

The parent menu.

isSubmenuItem boolean <optional>
false

A flag to mark if the menu item is controlling a submenu.

childMenu BaseMenu <optional>
<nullable>
null

The child menu.

toggle BaseMenuToggle <optional>
<nullable>
null

The controller for the child menu.

Members

(protected) _dom :Object.<HTMLElement>

Description:
  • The DOM elements within the menu item.

Source:
Properties:
Name Type Description
item HTMLElement

The menu item.

link HTMLElement

The menu item's link.

The DOM elements within the menu item.

Type:
  • Object.<HTMLElement>

(protected) _elements :Object.<BaseMenu, BaseMenuToggle>

Description:
  • The declared accessible-menu elements within the menu item.

Source:
Properties:
Name Type Attributes Description
parentMenu BaseMenu

The menu containing this menu item.

childMenu BaseMenu <nullable>

The menu contained within this menu item.

toggle BaseMenuToggle <nullable>

The menu toggle within this menu item that controls the childMenu.

The declared accessible-menu elements within the menu item.

Type:

_submenu :boolean

Description:
  • A flag marking a submenu item.

Source:

A flag marking a submenu item.

Type:
  • boolean

(readonly) dom :Object.<HTMLElement>

Description:
  • The DOM elements within the menu item.

Source:
See:
  • _dom

The DOM elements within the menu item.

Type:
  • Object.<HTMLElement>

(readonly) elements :Object.<BaseMenu, BaseMenuToggle>

Description:
  • The declared accessible-menu elements within the menu item.

Source:
See:
  • _elements

The declared accessible-menu elements within the menu item.

Type:

(readonly) isSubmenuItem :boolean

Description:
  • A flag marking a submenu item.

Source:
See:
  • _submenu

A flag marking a submenu item.

Type:
  • boolean

Methods

initialize()

Description:
  • Initialize the menu item.

Source:

focus()

Description:
  • Focuses the menu item's link if the parent menu's shouldFocus value is true.

Source:

blur()

Description:
  • Blurs the menu item's link if the parent menu's shouldFocus value is true.

Source: