You can also attach other fields to element of the `template`, and they will
become properties of the constructed menu items.
### Menu.popup(browserWindow, [x, y])
*`browserWindow` BrowserWindow
*`x` Number
*`y` Number
Popups this menu as a context menu in the `browserWindow`. You can optionally
provide a `(x,y)` coordinate to place the menu at, otherwise it will be placed
at the current mouse cursor position.
### Menu.append(menuItem)
*`menuItem` MenuItem
Appends the `menuItem` to the menu.
### Menu.insert(pos, menuItem)
*`pos` Integer
*`menuItem` MenuItem
Inserts the `menuItem` to the `pos` position of the menu.
### Menu.items
Get the array containing the menu's items.
## Notes on OS X application menu
OS X has a completely different style of application menu from Windows and
Linux, and here are some notes on making your app's menu more native-like.
### Standard menus
On OS X there are many system defined standard menus, like the `Services` and
`Windows` menus. To make your menu a standard menu, you can just set your menu's
label to one of followings, and Electron will recognize them and make them
become standard menus:
*`Window`
*`Help`
*`Services`
### Standard menu item actions
OS X has provided standard actions for some menu items (which are called
`selector`s), like `About xxx`, `Hide xxx`, and `Hide Others`. To set the action
of a menu item to a standard action, you can set the `selector` attribute of the
menu item.
### Main menu's name
On OS X the label of application menu's first item is always your app's name,
no matter what label you set. To change it you have to change your app's name
by modifying your app bundle's `Info.plist` file. See
[About Information Property List Files](https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html)
for more.
## Menu item position
You can make use of `position` and `id` to control how the item would be placed
when building a menu with `Menu.buildFromTemplate`.
The `position` attribute of `MenuItem` has the form `[placement]=[id]` where
placement is one of `before`, `after`, or `endof` and `id` is the unique ID of
an existing item in the menu:
*`before` - Inserts this item before the id referenced item. If the
referenced item doesn't exist the item will be inserted at the end of
the menu.
*`after` - Inserts this item after id referenced item. If the referenced
item doesn't exist the item will be inserted at the end of the menu.
*`endof` - Inserts this item at the end of the logical group containing
the id referenced item. (Groups are created by separator items). If
the referenced item doesn't exist a new separator group is created with
the given id and this item is inserted after that separator.
When an item is positioned following unpositioned items are inserted after
it, until a new item is positioned. So if you want to position a group of
menu items in the same location you only need to specify a position for