The HTML element that contains the context menu targets.
A CSS selector which activates the context menu.
Optionaloptions: FilterMenuOptions = {}Additional options to configure the context menu.
The array of menu items to render.
A function to call when the context menu is closed.
A function to call when the context menu is opened.
The menu element.
The event name to listen for.
Check which direction the menu is expanded in.
Whether to position the context menu as a fixed element, or inject it into the target.
For fixed context menus, control whether the menu is positioned relative to the target or to the mouse cursor. Non-fixed context menus are always positioned relative to the target.
A CSS selector to identify context menu targets.
The parent HTML element to which the context menu is attached
StaticimplementationRetrieve the configured ContextMenu implementation.
Called before the menu's entries are rendered.
Local listeners which apply to each ContextMenu instance which is created.
The context menu element.
Optionaloptions: ContextMenuRenderOptions = {}Closes the menu and removes it from the DOM.
Optionaloptions: { animate?: boolean; target?: HTMLElement } = {}Options to configure the closing behavior.
Optionalanimate?: booleanAnimate the context menu closing.
Optionaltarget?: HTMLElementThe target element to close on.
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.
Optionaloptions: ContextMenuRenderOptions = {}A Promise that resolves when the open animation has completed.
Protected_ProtectedAnimate the context menu's height when opening or closing.
Whether the menu is opening or closing.
A Promise that resolves when the animation completes.
Protected_ProtectedClose the menu and remove it from the DOM.
Optionaloptions: { target?: HTMLElement } = {}Optionaltarget?: HTMLElementThe target element to close on.
Protected_ProtectedInject the menu inside the target.
The menu element.
The context target.
Protected_ProtectedHandle context menu activation.
The triggering event.
Protected_ProtectedCalled after the context menu has finished rendering and animating open.
Optionaloptions: ContextMenuRenderOptions = {}Protected_ProtectedCalled after the context menu has finished rendering its entries.
The rendered menu.
Optionaloptions: ContextMenuRenderOptions = {}Protected_ProtectedCalled before the context menu begins rendering.
The context target.
Optionaloptions: ContextMenuRenderOptions = {}Protected_ProtectedSet the context menu at a fixed position in the viewport.
The menu element.
The context target.
Optionaloptions: { event?: Event } = {}Optionalevent?: EventThe event that triggered the context menu opening.
Protected_ProtectedSet the position of the context menu, taking into consideration whether the menu should expand upward or downward
The context menu element.
The element that the context menu was spawned on.
Optionaloptions: { event?: Event } = {}Optionalevent?: EventThe event that triggered the context menu opening.
StaticactivateBind global context menu listeners to a given document.
The document.
StaticcreateCreate 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.
Optionaloptions: { hookName?: string } = {}Additional options to configure context menu initialization.
OptionalhookName?: stringThe name of the hook to call.
A specialized subclass of ContextMenu designed for displaying a menu of filter options.