updates to the docs
This commit is contained in:
parent
cb3c5ded0f
commit
5db02ffaa9
8 changed files with 22 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
||||||
## Class: BrowserView
|
# Class: BrowserView
|
||||||
|
|
||||||
> Create and control views.
|
> Create and control views.
|
||||||
|
|
||||||
|
|
|
@ -50,4 +50,4 @@ The `BrowserWindowProxy` object has the following instance properties:
|
||||||
|
|
||||||
#### `win.closed`
|
#### `win.closed`
|
||||||
|
|
||||||
A Boolean that is set to true after the child window gets closed.
|
A `Boolean` that is set to true after the child window gets closed.
|
||||||
|
|
|
@ -143,7 +143,7 @@ Emitted when there is redirection and the mode is `manual`. Calling
|
||||||
|
|
||||||
#### `request.chunkedEncoding`
|
#### `request.chunkedEncoding`
|
||||||
|
|
||||||
A Boolean specifying whether the request will use HTTP chunked transfer encoding
|
A `Boolean` specifying whether the request will use HTTP chunked transfer encoding
|
||||||
or not. Defaults to false. The property is readable and writable, however it can
|
or not. Defaults to false. The property is readable and writable, however it can
|
||||||
be set only before the first write operation as the HTTP headers are not yet put
|
be set only before the first write operation as the HTTP headers are not yet put
|
||||||
on the wire. Trying to set the `chunkedEncoding` property after the first write
|
on the wire. Trying to set the `chunkedEncoding` property after the first write
|
||||||
|
@ -184,7 +184,7 @@ before first write. Trying to call it after the first write will throw an error.
|
||||||
string, it is converted into a Buffer using the specified encoding.
|
string, it is converted into a Buffer using the specified encoding.
|
||||||
* `encoding` String (optional) - Used to convert string chunks into Buffer
|
* `encoding` String (optional) - Used to convert string chunks into Buffer
|
||||||
objects. Defaults to 'utf-8'.
|
objects. Defaults to 'utf-8'.
|
||||||
* `callback` Function (optional) - Called after the write operation ends.
|
* `callback` Function (optional) - Called after the write operation ends.
|
||||||
|
|
||||||
`callback` is essentially a dummy function introduced in the purpose of keeping
|
`callback` is essentially a dummy function introduced in the purpose of keeping
|
||||||
similarity with the Node.js API. It is called asynchronously in the next tick
|
similarity with the Node.js API. It is called asynchronously in the next tick
|
||||||
|
|
|
@ -43,15 +43,15 @@ An `IncomingMessage` instance has the following readable properties:
|
||||||
|
|
||||||
#### `response.statusCode`
|
#### `response.statusCode`
|
||||||
|
|
||||||
An Integer indicating the HTTP response status code.
|
An `Integer` indicating the HTTP response status code.
|
||||||
|
|
||||||
#### `response.statusMessage`
|
#### `response.statusMessage`
|
||||||
|
|
||||||
A String representing the HTTP status message.
|
A `String` representing the HTTP status message.
|
||||||
|
|
||||||
#### `response.headers`
|
#### `response.headers`
|
||||||
|
|
||||||
An Object representing the response HTTP headers. The `headers` object is
|
An `Object` representing the response HTTP headers. The `headers` object is
|
||||||
formatted as follows:
|
formatted as follows:
|
||||||
|
|
||||||
* All header names are lowercased.
|
* All header names are lowercased.
|
||||||
|
@ -60,15 +60,15 @@ formatted as follows:
|
||||||
|
|
||||||
#### `response.httpVersion`
|
#### `response.httpVersion`
|
||||||
|
|
||||||
A String indicating the HTTP protocol version number. Typical values are '1.0'
|
A `String` indicating the HTTP protocol version number. Typical values are '1.0'
|
||||||
or '1.1'. Additionally `httpVersionMajor` and `httpVersionMinor` are two
|
or '1.1'. Additionally `httpVersionMajor` and `httpVersionMinor` are two
|
||||||
Integer-valued readable properties that return respectively the HTTP major and
|
Integer-valued readable properties that return respectively the HTTP major and
|
||||||
minor version numbers.
|
minor version numbers.
|
||||||
|
|
||||||
#### `response.httpVersionMajor`
|
#### `response.httpVersionMajor`
|
||||||
|
|
||||||
An Integer indicating the HTTP protocol major version number.
|
An `Integer` indicating the HTTP protocol major version number.
|
||||||
|
|
||||||
#### `response.httpVersionMinor`
|
#### `response.httpVersionMinor`
|
||||||
|
|
||||||
An Integer indicating the HTTP protocol minor version number.
|
An `Integer` indicating the HTTP protocol minor version number.
|
||||||
|
|
|
@ -93,17 +93,17 @@ The following properties are available on instances of `MenuItem`:
|
||||||
|
|
||||||
#### `menuItem.enabled`
|
#### `menuItem.enabled`
|
||||||
|
|
||||||
A Boolean indicating whether the item is enabled, this property can be
|
A `Boolean` indicating whether the item is enabled, this property can be
|
||||||
dynamically changed.
|
dynamically changed.
|
||||||
|
|
||||||
#### `menuItem.visible`
|
#### `menuItem.visible`
|
||||||
|
|
||||||
A Boolean indicating whether the item is visible, this property can be
|
A `Boolean` indicating whether the item is visible, this property can be
|
||||||
dynamically changed.
|
dynamically changed.
|
||||||
|
|
||||||
#### `menuItem.checked`
|
#### `menuItem.checked`
|
||||||
|
|
||||||
A Boolean indicating whether the item is checked, this property can be
|
A `Boolean` indicating whether the item is checked, this property can be
|
||||||
dynamically changed.
|
dynamically changed.
|
||||||
|
|
||||||
A `checkbox` menu item will toggle the `checked` property on and off when
|
A `checkbox` menu item will toggle the `checked` property on and off when
|
||||||
|
@ -116,8 +116,8 @@ You can add a `click` function for additional behavior.
|
||||||
|
|
||||||
#### `menuItem.label`
|
#### `menuItem.label`
|
||||||
|
|
||||||
A String representing the menu items visible label
|
A `String` representing the menu items visible label
|
||||||
|
|
||||||
#### `menuItem.click`
|
#### `menuItem.click`
|
||||||
|
|
||||||
A Function that is fired when the MenuItem receives a click event
|
A `Function` that is fired when the MenuItem receives a click event
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Class: Menu
|
# Class: Menu
|
||||||
|
|
||||||
> Create native application menus and context menus.
|
> Create native application menus and context menus.
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ Inserts the `menuItem` to the `pos` position of the menu.
|
||||||
|
|
||||||
#### `menu.items`
|
#### `menu.items`
|
||||||
|
|
||||||
A MenuItem[] array containing the menu's items.
|
A `MenuItem[]` array containing the menu's items.
|
||||||
|
|
||||||
Each `Menu` consists of multiple [`MenuItem`](menu-item.md)s and each `MenuItem`
|
Each `Menu` consists of multiple [`MenuItem`](menu-item.md)s and each `MenuItem`
|
||||||
can have a submenu.
|
can have a submenu.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Class: TouchBar
|
# Class: TouchBar
|
||||||
|
|
||||||
> Create TouchBar layouts for native macOS applications
|
> Create TouchBar layouts for native macOS applications
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ Process: [Main](../tutorial/quick-start.md#main-process)
|
||||||
|
|
||||||
### `new TouchBar(options)` _Experimental_
|
### `new TouchBar(options)` _Experimental_
|
||||||
|
|
||||||
* `options` - Object
|
* `options` Object
|
||||||
* `items` ([TouchBarButton](touch-bar-button.md) | [TouchBarColorPicker](touch-bar-color-picker.md) | [TouchBarGroup](touch-bar-group.md) | [TouchBarLabel](touch-bar-label.md) | [TouchBarPopover](touch-bar-popover.md) | [TouchBarScrubber](touch-bar-scrubber.md) | [TouchBarSegmentedControl](touch-bar-segmented-control.md) | [TouchBarSlider](touch-bar-slider.md) | [TouchBarSpacer](touch-bar-spacer.md))[]
|
* `items` ([TouchBarButton](touch-bar-button.md) | [TouchBarColorPicker](touch-bar-color-picker.md) | [TouchBarGroup](touch-bar-group.md) | [TouchBarLabel](touch-bar-label.md) | [TouchBarPopover](touch-bar-popover.md) | [TouchBarScrubber](touch-bar-scrubber.md) | [TouchBarSegmentedControl](touch-bar-segmented-control.md) | [TouchBarSlider](touch-bar-slider.md) | [TouchBarSpacer](touch-bar-spacer.md))[]
|
||||||
* `escapeItem` ([TouchBarButton](touch-bar-button.md) | [TouchBarColorPicker](touch-bar-color-picker.md) | [TouchBarGroup](touch-bar-group.md) | [TouchBarLabel](touch-bar-label.md) | [TouchBarPopover](touch-bar-popover.md) | [TouchBarScrubber](touch-bar-scrubber.md) | [TouchBarSegmentedControl](touch-bar-segmented-control.md) | [TouchBarSlider](touch-bar-slider.md) | [TouchBarSpacer](touch-bar-spacer.md)) (optional)
|
* `escapeItem` ([TouchBarButton](touch-bar-button.md) | [TouchBarColorPicker](touch-bar-color-picker.md) | [TouchBarGroup](touch-bar-group.md) | [TouchBarLabel](touch-bar-label.md) | [TouchBarPopover](touch-bar-popover.md) | [TouchBarScrubber](touch-bar-scrubber.md) | [TouchBarSegmentedControl](touch-bar-segmented-control.md) | [TouchBarSlider](touch-bar-slider.md) | [TouchBarSpacer](touch-bar-spacer.md)) (optional)
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ The following properties are available on instances of `TouchBar`:
|
||||||
|
|
||||||
#### `touchBar.escapeItem`
|
#### `touchBar.escapeItem`
|
||||||
|
|
||||||
The `TouchBarItem` that will replace the "esc" button on the touch bar when set.
|
The `TouchBarButton` that will replace the "esc" button on the touch bar when set.
|
||||||
Setting to `null` restores the default "esc" button. Changing this value
|
Setting to `null` restores the default "esc" button. Changing this value
|
||||||
immediately updates the escape item in the touch bar.
|
immediately updates the escape item in the touch bar.
|
||||||
|
|
||||||
|
|
|
@ -1335,11 +1335,11 @@ Returns `Integer` - The `pid` of the associated renderer process.
|
||||||
|
|
||||||
#### `contents.id`
|
#### `contents.id`
|
||||||
|
|
||||||
A Integer representing the unique ID of this WebContents.
|
A `Integer` representing the unique ID of this WebContents.
|
||||||
|
|
||||||
#### `contents.session`
|
#### `contents.session`
|
||||||
|
|
||||||
A Session object ([session](session.md)) used by this webContents.
|
A [`Session`](session.md) used by this webContents.
|
||||||
|
|
||||||
#### `contents.hostWebContents`
|
#### `contents.hostWebContents`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue