Creates a context menu the - the function should return a list describing the menu The list should contain objects with text,icon,ghosted,func and subitems

Constructors

Properties

__doc__: undefined | Document = undefined
menus: any[]
removeFunc: undefined | () => void
setItemFunction: (data: any) => any

Methods

  • closes the menu and removes it from the dom will be called uf the user clicks outside the menu

    Returns void

  • Will show the actual menu

    Parameters

    • e: Event

      The event that triggers the context menu required to position the menu and also the menu is attached to event target

    • Optionaldata: any

      optional, the menu will be constructed based on the function given to the construtor and the data passed in this method

    Returns void