The containing HTML element within which the menu is positioned
A CSS selector which activates the context menu.
An Array of entries to display in the menu
Additional options to configure the context menu.
The target HTMLElement being selected
The target CSS selector which activates the menu
An interaction event name which activates the menu
The array of menu items being rendered
A function to call when the context menu is opened.
A function to call when the context menu is closed.
Track which direction the menu is expanded in
The parent HTML element to which the context menu is attached
A convenience accessor to the context menu HTML object
Attach a ContextMenu instance to an HTML selector
Closes the menu and removes it from the DOM.
Options to configure the closing behavior.
Render the Context Menu by iterating over the menuItems it contains. Check the visibility of each menu item, and only render ones which are allowed by the item's logical condition. Attach a click handler to each item which is rendered.
The target element to which the context menu is attached
Local listeners which apply to each ContextMenu instance which is created.
Set the position of the context menu, taking into consideration whether the menu should expand upward or downward
Handle click events on context menu items.
The click event
Create a ContextMenu for this Application and dispatch hooks.
The Application this ContextMenu belongs to.
The Application's rendered HTML.
The target CSS selector which activates the menu.
The array of menu items being rendered.
Additional options to configure context menu initialization.
Global listeners which apply once only to the document.
Display a right-click activated Context Menu which provides a dropdown menu of options A ContextMenu is constructed by designating a parent HTML container and a target selector An Array of menuItems defines the entries of the menu which is displayed