WorkspaceLeaf.on('leaf-menu') method
WorkspaceLeaf › on(‘leaf-menu’)
Unofficial
Triggers when context menu action is executed on the leaf.Signature:
on(name: "leaf-menu", callback: (menu: Menu, leaf: WorkspaceLeaf) => void, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "leaf-menu" | Should be 'leaf-menu'. |
| callback | (menu: Menu, leaf: WorkspaceLeaf) => void | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.