Skip to content

DisclosureMenuItem

A basic navigation link contained inside of a DisclosureMenu.

Note

This is a subclass of BaseMenuItem.

Constructor

Constructs a new DisclosureMenuItem.

js
new DisclosureMenuItem({
  menuItemElement,
  menuLinkElement,
  parentMenu,
  isSubmenuItem,
  childMenu,
  toggle,
  initialize,
});

The constructor will call BaseMenuItem's constructor with the provided options. It will also initialize the menu item if the initialize flag is set to true.

Parameters

NameTypeDescriptionDefault
optionsobjectThe options for generating the menu item.undefined
options.menuItemElementHTMLElementThe menu item in the DOM.undefined
options.menuLinkElementHTMLElementThe menu item's link in the DOM.undefined
options.parentMenuDisclosureMenuThe parent menu.undefined
options.isSubmenuItembooleanA flag to mark if the menu item is controlling a submenu.false
options.childMenuDisclosureMenu, nullThe child menu.null
options.toggleDisclosureMenuToggle, nullThe controller for the child menu.null
options.initializebooleanA flag to initialize the menu item immediately upon creation.true

Initialize

The initialize method is inherited from the BaseMenuItem class. There are no customizations for the DisclosureMenuItem class.

Properties

Properties are inherited from the BaseMenuItem class. There are no custom properties for the DisclosureMenuItem class.

Getters and Setters

Getters and setters are inherited from the BaseMenuItem class. There are no custom getters and setters for the DisclosureMenuItem class.

Methods

Methods are inherited from the BaseMenuItem class. There are no custom methods for the DisclosureMenuItem class.