API
Methods for manipulating native menus in ToDesktop.
Remarks
This package exposes a number of methods for manipulating native menus wthin ToDesktop windows.
On macOS, these menus are displayed at the top of the user's screen in the top bar. On Windows and Linux, these menus are displayed under the window title bar.
Functions
add()
Adds an item to the Application's menu bar.
Signature:
Parameters
Returns:
Promise<void>
on()
Subscribes to a click event from the application menu
Signature:
Parameters
Returns:
Promise<() => void>
A callback for unsubscribing from the click event.
refresh()
Triggers the application's menu bar UI to refresh. Useful after adding new menu items.
Signature:
Returns:
Promise<void>
Type Aliases
MenuItemOptions
Configuration object for a native menu item.
Signature: