fix heading levels in Menu doc
This commit is contained in:
parent
2486512c71
commit
b20606c718
1 changed files with 12 additions and 12 deletions
|
@ -183,11 +183,11 @@ Menu.setApplicationMenu(menu);
|
|||
|
||||
Creates a new menu.
|
||||
|
||||
## Methods
|
||||
### Static Methods
|
||||
|
||||
The `menu` class has the following methods:
|
||||
The `menu` class has the following static methods:
|
||||
|
||||
### `Menu.setApplicationMenu(menu)`
|
||||
#### `Menu.setApplicationMenu(menu)`
|
||||
|
||||
* `menu` Menu
|
||||
|
||||
|
@ -196,11 +196,11 @@ will be set as each window's top menu.
|
|||
|
||||
**Note:** This API has to be called after the `ready` event of `app` module.
|
||||
|
||||
### `Menu.getApplicationMenu()`
|
||||
#### `Menu.getApplicationMenu()`
|
||||
|
||||
Returns the application menu (an instance of `Menu`), if set, or `null`, if not set.
|
||||
|
||||
### `Menu.sendActionToFirstResponder(action)` _macOS_
|
||||
#### `Menu.sendActionToFirstResponder(action)` _macOS_
|
||||
|
||||
* `action` String
|
||||
|
||||
|
@ -211,7 +211,7 @@ emulating default Cocoa menu behaviors, usually you would just use the
|
|||
See the [macOS Cocoa Event Handling Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW7)
|
||||
for more information on macOS' native actions.
|
||||
|
||||
### `Menu.buildFromTemplate(template)`
|
||||
#### `Menu.buildFromTemplate(template)`
|
||||
|
||||
* `template` Array
|
||||
|
||||
|
@ -221,11 +221,11 @@ Generally, the `template` is just an array of `options` for constructing a
|
|||
You can also attach other fields to the element of the `template` and they
|
||||
will become properties of the constructed menu items.
|
||||
|
||||
## Instance Methods
|
||||
### Instance Methods
|
||||
|
||||
The `menu` object has the following instance methods:
|
||||
|
||||
### `menu.popup([browserWindow, x, y, positioningItem])`
|
||||
#### `menu.popup([browserWindow, x, y, positioningItem])`
|
||||
|
||||
* `browserWindow` BrowserWindow (optional) - Default is `null`.
|
||||
* `x` Number (optional) - Default is -1.
|
||||
|
@ -238,24 +238,24 @@ Pops up 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)`
|
||||
#### `menu.append(menuItem)`
|
||||
|
||||
* `menuItem` MenuItem
|
||||
|
||||
Appends the `menuItem` to the menu.
|
||||
|
||||
### `menu.insert(pos, menuItem)`
|
||||
#### `menu.insert(pos, menuItem)`
|
||||
|
||||
* `pos` Integer
|
||||
* `menuItem` MenuItem
|
||||
|
||||
Inserts the `menuItem` to the `pos` position of the menu.
|
||||
|
||||
## Instance Properties
|
||||
### Instance Properties
|
||||
|
||||
`menu` objects also have the following properties:
|
||||
|
||||
### `menu.items`
|
||||
#### `menu.items`
|
||||
|
||||
Get an array containing the menu's items.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue