Skip to content

Commit

Permalink
docs: document macOS restrictions on Menu::add_item (#7983)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored Oct 16, 2023
1 parent d6e10e2 commit dfe0bad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/tauri-runtime/src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ impl Menu {
}

/// Adds the custom menu item to the menu.
///
/// ## Platform-spcific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu
///
/// [`Submenu`]: crate::Submenu
#[must_use]
pub fn add_item(mut self, item: CustomMenuItem) -> Self {
self.items.push(MenuEntry::CustomItem(item));
Expand Down

0 comments on commit dfe0bad

Please sign in to comment.