Tauri Core API - v2.6.0
    Preparing search index...

    Class Menu

    A type that is either a menu bar on the window on Windows and Linux or as a global menu in the menubar on macOS.

    • macOS: if using Menu for the global menubar, it can only contain Submenus.

    Hierarchy

    • MenuItemBase
      • Menu
    Index

    Accessors

    • get rid(): number

      Returns number

    • get id(): string

      The id of this item.

      Returns string

    Methods

    • Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.

      Returns Promise<void>

    • Sets the app-wide menu and returns the previous one.

      If a window was not created with an explicit menu or had one set explicitly, this menu will be assigned to it.

      Returns Promise<null | Menu>

    • Sets the window menu and returns the previous one.

      • macOS: Unsupported. The menu on macOS is app-wide and not specific to one window, if you need to set it, use Menu.setAsAppMenu instead.

      Parameters

      Returns Promise<null | Menu>