From dfe0badf19dd3d3f227999a3cf2c4818dacd105b Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 16 Oct 2023 15:15:15 +0300 Subject: [PATCH] docs: document macOS restrictions on `Menu::add_item` (#7983) --- core/tauri-runtime/src/menu.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/tauri-runtime/src/menu.rs b/core/tauri-runtime/src/menu.rs index bc65aa890..1d47dd86c 100644 --- a/core/tauri-runtime/src/menu.rs +++ b/core/tauri-runtime/src/menu.rs @@ -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));