Creates a new context menu
Optionaloptions: MenuOptionsOptionaloptions: MenuOptionsOptionalpluginThe ID of the plugin that created the object
Static Optionalclosed_StaticopenAdds an action to the menu structure
Action to add
Optionalpath: string | numberPath pointing to the location. Use the ID of each level of the menu, or index within a level, separated by a point. For example, export.0 places the action at the top position of the Export submenu.
Closes the menu if it's open
Optionalexpand: booleanOpens the menu somewhere
Position where to open the menu. Can be a mouse event, or a node that the menu is spawned below.
Optionalcontext: anyContext for the click events inside the menu
Path pointing to the location. Use the ID of each level of the menu, or index within a level, or item ID, separated by a point. For example, export.export_special_format removes the action "Export Special Format" from the Export submenu.
Alias for .open()
Optionalcontext: any
Use the Menu class to create a context menu. Menus can contain custom entries and hierarchy, or existing actions and tools.