]> khamidou — GitHub mirrors - electron.git/commitdiff
Mention conversion using Menu.buildFromTemplate
authorKevin Sawicki <kevinsawicki@gmail.com>
Mon, 7 Dec 2015 17:36:07 +0000 (09:36 -0800)
committerKevin Sawicki <kevinsawicki@gmail.com>
Mon, 7 Dec 2015 17:36:21 +0000 (09:36 -0800)
docs/api/menu-item.md

index 37079233fc0c426c56b0e18416007fe144a1e75e..af945e8aca486190f2cf2193bc1765d4932101d2 100644 (file)
@@ -26,7 +26,9 @@ Create a new `MenuItem` with the following method:
   * `visible` Boolean
   * `checked` Boolean
   * `submenu` Menu - Should be specified for `submenu` type menu item, when
-     it's specified the `type: 'submenu'` can be omitted for the menu item
+     it's specified the `type: 'submenu'` can be omitted for the menu item.
+     If the value is not a `Menu` then it will be automatically converted to one
+     using `Menu.buildFromTemplate`.
   * `id` String - Unique within a single menu. If defined then it can be used
      as a reference to this item by the position attribute.
   * `position` String - This field allows fine-grained definition of the