API Docs for: 3.8.0
Show:

plugin.NodeMenuNav Class

The NodeMenuNav class is a plugin for a Node instance. The class is used via
the plug method of Node and should not be instantiated directly.

Methods

_afterActiveDescendantChange

(
  • event
  • menuNav
)
protected

"activeDescendantChange" event handler for menu's Focus Manager.

Parameters:

  • event Object

    Object representing the Attribute change event.

  • menuNav NodeMenuNav

    Object representing the NodeMenuNav instance.

_cancelHideSubmenuTimer

() protected

Cancels the timer used to hide a submenu.

_cancelShowSubmenuTimer

() protected

Cancels the timer used to show a submenu.

_clearActiveItem

() protected

Clears the menu's active descendent.

_focusItem

(
  • item
)
protected

Focuses the specified menuitem or menu label.

Parameters:

  • item Node

    Node instance representing a menuitem or menu label.

_getTopmostSubmenu

(
  • menu
)
Node protected

Returns the topmost submenu of a submenu hierarchy.

Parameters:

  • menu Node

    Node instance representing a menu.

Returns:

Node: Node instance representing a menu.

_hideAllSubmenus

(
  • menu
)
protected

Hides all submenus of the specified menu.

Parameters:

  • menu Node

    Node instance representing a menu.

_hideAndFocusLabel

() protected

Hides all of the submenus of the root menu and focuses the label of the topmost submenu

_hideMenu

(
  • menu
  • activateAndFocusLabel
)
protected

Hides the specified menu.

Parameters:

  • menu Node

    Node instance representing a menu.

  • activateAndFocusLabel Boolean

    Boolean indicating if the label for the specified menu should be focused and set as active.

_initFocusManager

() protected

Initializes and updates the Focus Manager so that is is always managing descendants of the active menu.

_isRoot

(
  • menu
)
Boolean protected

Returns a boolean indicating if the specified menu is the root menu in the menu.

Parameters:

  • menu Node

    Node instance representing a menu.

Returns:

Boolean: Boolean indicating if the specified menu is the root menu in the menu.

_onActiveDescendantChange

(
  • event
  • menuNav
)
protected

"activeDescendantChange" event handler for menu's Focus Manager.

Parameters:

  • event Object

    Object representing the Attribute change event.

  • menuNav NodeMenuNav

    Object representing the NodeMenuNav instance.

_onDocFocus

(
  • event
)
protected

"focus" event handler for the owner document of the MenuNav.

Parameters:

  • event Object

    Object representing the DOM event.

_onDocMouseDown

(
  • event
)
protected

"mousedown" event handler for the owner document of the menu.

Parameters:

  • event Object

    Object representing the DOM event.

_onHorizontalMenuKeyDown

(
  • event
)
protected

"keydown" event handler for horizontal menus.

Parameters:

  • event Object

    Object representing the DOM event.

_onKeyDown

(
  • event
)
protected

"keydown" event handler for the menu.

Parameters:

  • event Object

    Object representing the DOM event.

_onKeyPress

(
  • event
)
protected

"keypress" event handler for the menu.

Parameters:

  • event Object

    Object representing the DOM event.

_onMenuItemMouseOut

(
  • menuItem
  • event
)
protected

"mouseout" event handler for a menuitem.

Parameters:

  • menuItem Node

    Node instance representing a menuitem.

  • event Object

    Object representing the DOM event.

_onMenuItemMouseOver

(
  • menuItem
  • event
)
protected

"mouseover" event handler for a menuitem.

Parameters:

  • menuItem Node

    Node instance representing a menuitem.

  • event Object

    Object representing the DOM event.

_onMenuLabelMouseOut

(
  • menuLabel
  • event
)
protected

"mouseout" event handler for a menu label.

Parameters:

  • menuLabel Node

    Node instance representing a menu label.

  • event Object

    Object representing the DOM event.

_onMenuLabelMouseOver

(
  • menuLabel
  • event
)
protected

"mouseover" event handler for a menu label.

Parameters:

  • menuLabel Node

    Node instance representing a menu label.

  • event Object

    Object representing the DOM event.

_onMenuMouseOut

(
  • menu
  • event
)
protected

"mouseout" event handler for a menu.

Parameters:

  • menu Node

    Node instance representing a menu.

  • event Object

    Object representing the DOM event.

_onMenuMouseOver

(
  • menu
  • event
)
protected

"mouseover" event handler for a menu.

Parameters:

  • menu Node

    Node instance representing a menu.

  • event Object

    Object representing the DOM event.

_onMouseMove

(
  • event
)
protected

"mousemove" event handler for the menu.

Parameters:

  • event Object

    Object representing the DOM event.

_onMouseOut

(
  • event
)
protected

"mouseout" event handler for the menu.

Parameters:

  • event Object

    Object representing the DOM event.

_onMouseOver

(
  • event
)
protected

"mouseover" event handler for the menu.

Parameters:

  • event Object

    Object representing the DOM event.

_onVerticalMenuKeyDown

(
  • event
)
protected

"keydown" event handler for vertical menus.

Parameters:

  • event Object

    Object representing the DOM event.

_setActiveItem

(
  • item
)
protected

Sets the specified menuitem or menu label as the menu's active descendent.

Parameters:

  • item Node

    Node instance representing a menuitem or menu label.

_showMenu

(
  • menu
)
protected

Shows the specified menu.

Parameters:

  • menu Node

    Node instance representing a menu.

_toggleSubmenuDisplay

(
  • event
)
protected

"mousedown," "keydown," and "click" event handler for the menu used to toggle the display of a submenu.

Parameters:

  • event Object

    Object representing the DOM event.

Properties

_activeItem

Node protected

Node instance representing the menu's active descendent: the menuitem or menu label the user is currently interacting with.

Default: null

_activeMenu

Node protected

Node instance representing the menu that is the parent of the menu's active descendent.

Default: null

_blockMouseEvent

Boolean protected

Boolean indicating whether or not to handle the "mouseover" event.

Default: false

_currentMouseX

Number protected

Number representing the current x coordinate of the mouse inside the menu.

Default: 0

_firstItem

Node protected

Node instance representing the first item (menuitem or menu label) in the root menu of a menu.

Default: null

_hasFocus

Boolean protected

Boolean indicating if the menu has focus.

Default: false

_hideAllSubmenusTimer

Object protected

Timer used to hide a all submenus.

Default: null

_hideSubmenuTimer

Object protected

Timer used to hide a submenu.

Default: null

_movingToSubmenu

Boolean protected

Boolean indicating if the mouse is moving from a menu label to its corresponding submenu.

Default: false

_rootMenu

Node protected

Node instance representing the root menu in the menu.

Default: null

_showSubmenuTimer

Object protected

Timer used to show a submenu.

Default: null

SHIM_TEMPLATE

String

String representing the HTML used to create the <iframe> shim used to prevent <select> elements from poking through menus in IE 6.

Default: &#34;&#60;iframe frameborder=&#34;0&#34; tabindex=&#34;-1&#34; class=&#34;yui-shim&#34; title=&#34;Menu Stacking Shim&#34; src=&#34;javascript:false;&#34;&#62;&#60;/iframe&#62;&#34;

SHIM_TEMPLATE_TITLE

String

String representing the value for the title attribute for the shim used to prevent <select> elements from poking through menus in IE 6.

Default: "Menu Stacking Shim"

Attributes

autoSubmenuDisplay

Boolean readonly

Boolean indicating if submenus are automatically made visible when the user mouses over the menu's items.

Default: true

Fires event autoSubmenuDisplayChange

Fires when the value for the configuration attribute autoSubmenuDisplay is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

mouseOutHideDelay

Number readonly

Number indicating the time (in milliseconds) that should expire before a submenu is hidden when the user mouses out of it.

Default: 750

Fires event mouseOutHideDelayChange

Fires when the value for the configuration attribute mouseOutHideDelay is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

submenuHideDelay

Number readonly

Number indicating the time (in milliseconds) that should expire before a submenu is hidden when the user mouses out of a menu label heading in the direction of a submenu.

Default: 250

Fires event submenuHideDelayChange

Fires when the value for the configuration attribute submenuHideDelay is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

submenuShowDelay

Number readonly

Number indicating the time (in milliseconds) that should expire before a submenu is made visible when the user mouses over the menu's label.

Default: 250

Fires event submenuShowDelayChange

Fires when the value for the configuration attribute submenuShowDelay is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

useARIA

Boolean readonly

Boolean indicating if use of the WAI-ARIA Roles and States should be enabled for the menu.

Default: true

Fires event useARIAChange

Fires when the value for the configuration attribute useARIA is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.