Update docs for dts again

This commit is contained in:
Samuel Attard 2016-11-25 23:17:31 +11:00
parent b036fdfee0
commit 06960704c4
12 changed files with 53 additions and 33 deletions

View file

@ -189,7 +189,7 @@ Returns:
* `event` Event * `event` Event
* `webContents` [WebContents](web-contents.md) * `webContents` [WebContents](web-contents.md)
* `url` URL * `url` String
* `error` String - The error code * `error` String - The error code
* `certificate` [Certificate](structures/certificate.md) * `certificate` [Certificate](structures/certificate.md)
* `callback` Function * `callback` Function
@ -891,7 +891,7 @@ Sets the application's [dock menu][dock-menu].
### `app.dock.setIcon(image)` _macOS_ ### `app.dock.setIcon(image)` _macOS_
* `image` [NativeImage](native-image.md) * `image` ([NativeImage](native-image.md) | String)
Sets the `image` associated with this dock icon. Sets the `image` associated with this dock icon.

View file

@ -202,7 +202,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `thickFrame` Boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on * `thickFrame` Boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on
Windows, which adds standard window frame. Setting it to `false` will remove Windows, which adds standard window frame. Setting it to `false` will remove
window shadow and window animations. Default is `true`. window shadow and window animations. Default is `true`.
* `vibrancy` String - Add a type of vibrancy effect to the window, only on * `vibrancy` String - (optional) Add a type of vibrancy effect to the window, only on
macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`, macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`,
`menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`. `menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`.
* `zoomToPageWidth` Boolean - Controls the behavior on macOS when * `zoomToPageWidth` Boolean - Controls the behavior on macOS when

View file

@ -64,3 +64,11 @@ 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`
An Integer indicating the HTTP protocol major version number.
#### `response.httpVersionMinor`
An Integer indicating the HTTP protocol minor version number.

View file

@ -106,3 +106,11 @@ A `radio` menu item will turn on its `checked` property when clicked, and
will turn off that property for all adjacent items in the same menu. will turn off that property for all adjacent items in the same menu.
You can add a `click` function for additional behavior. You can add a `click` function for additional behavior.
#### `menuItem.label`
A String representing the menu items visible label
#### `menuItem.click`
A Function that is fired when the MenuItem recieves a click event

View file

@ -118,7 +118,7 @@ treated as a standard scheme.
* `method` String * `method` String
* `uploadData` [UploadData[]](structures/upload-data.md) * `uploadData` [UploadData[]](structures/upload-data.md)
* `callback` Function * `callback` Function
* `buffer` Buffer (optional) * `buffer` (Buffer | [MimeTypedBuffer](structures/mime-typed-buffer.md)) (optional)
* `completion` Function (optional) * `completion` Function (optional)
* `error` Error * `error` Error

View file

@ -200,7 +200,7 @@ The `proxyBypassRules` is a comma separated list of rules described below:
Match local addresses. The meaning of `<local>` is whether the Match local addresses. The meaning of `<local>` is whether the
host matches one of: "127.0.0.1", "::1", "localhost". host matches one of: "127.0.0.1", "::1", "localhost".
### `ses.resolveProxy(url, callback)` #### `ses.resolveProxy(url, callback)`
* `url` URL * `url` URL
* `callback` Function * `callback` Function

View file

@ -2,13 +2,13 @@
* `name` String - The name of the cookie. * `name` String - The name of the cookie.
* `value` String - The value of the cookie. * `value` String - The value of the cookie.
* `domain` String - The domain of the cookie. * `domain` String - (optional) The domain of the cookie.
* `hostOnly` String - Whether the cookie is a host-only cookie. * `hostOnly` Boolean - (optional) Whether the cookie is a host-only cookie.
* `path` String - The path of the cookie. * `path` String - (optional) The path of the cookie.
* `secure` Boolean - Whether the cookie is marked as secure. * `secure` Boolean - (optional) Whether the cookie is marked as secure.
* `httpOnly` Boolean - Whether the cookie is marked as HTTP only. * `httpOnly` Boolean - (optional) Whether the cookie is marked as HTTP only.
* `session` Boolean - Whether the cookie is a session cookie or a persistent * `session` Boolean - (optional) Whether the cookie is a session cookie or a persistent
cookie with an expiration date. cookie with an expiration date.
* `expirationDate` Double (optional) - The expiration date of the cookie as * `expirationDate` Double - (optional) The expiration date of the cookie as
the number of seconds since the UNIX epoch. Not provided for session the number of seconds since the UNIX epoch. Not provided for session
cookies. cookies.

View file

@ -1,6 +1,6 @@
# JumpListCategory Object # JumpListCategory Object
* `type` String - One of the following: * `type` String - (optional) One of the following:
* `tasks` - Items in this category will be placed into the standard `Tasks` * `tasks` - Items in this category will be placed into the standard `Tasks`
category. There can be only one such category, and it will always be category. There can be only one such category, and it will always be
displayed at the bottom of the Jump List. displayed at the bottom of the Jump List.

View file

@ -1,6 +1,6 @@
# JumpListItem Object # JumpListItem Object
* `type` String - One of the following: * `type` String - (optional) One of the following:
* `task` - A task will launch an app with specific arguments. * `task` - A task will launch an app with specific arguments.
* `separator` - Can be used to separate items in the standard `Tasks` * `separator` - Can be used to separate items in the standard `Tasks`
category. category.
@ -18,11 +18,11 @@
Should only be set if `type` is `task`. Should only be set if `type` is `task`.
* `description` String - (optional) Description of the task (displayed in a tooltip). * `description` String - (optional) Description of the task (displayed in a tooltip).
Should only be set if `type` is `task`. Should only be set if `type` is `task`.
* `iconPath` String - The absolute path to an icon to be displayed in a * `iconPath` String - (optional) The absolute path to an icon to be displayed in a
Jump List, which can be an arbitrary resource file that contains an icon Jump List, which can be an arbitrary resource file that contains an icon
(e.g. `.ico`, `.exe`, `.dll`). You can usually specify `process.execPath` to (e.g. `.ico`, `.exe`, `.dll`). You can usually specify `process.execPath` to
show the program icon. show the program icon.
* `iconIndex` Number - The index of the icon in the resource file. If a * `iconIndex` Number - (optional) The index of the icon in the resource file. If a
resource file contains multiple icons this value can be used to specify the resource file contains multiple icons this value can be used to specify the
zero-based index of the icon that should be displayed for this task. If a zero-based index of the icon that should be displayed for this task. If a
resource file contains only one icon, this property should be set to zero. resource file contains only one icon, this property should be set to zero.

View file

@ -0,0 +1,4 @@
# MimeTypedBuffer Object
* `mimeType` String - The mimeType of the Buffer that you are sending
* `buffer` Buffer - The actual Buffer content

View file

@ -154,7 +154,7 @@ Destroys the tray icon immediately.
#### `tray.setImage(image)` #### `tray.setImage(image)`
* `image` [NativeImage](native-image.md) * `image` ([NativeImage](native-image.md) | String)
Sets the `image` associated with this tray icon. Sets the `image` associated with this tray icon.
@ -210,9 +210,9 @@ win.on('hide', () => {
#### `tray.displayBalloon(options)` _Windows_ #### `tray.displayBalloon(options)` _Windows_
* `options` Object * `options` Object
* `icon` [NativeImage](native-image.md) * `icon` ([NativeImage](native-image.md) | String) - (optional)
* `title` String * `title` String - (optional)
* `content` String * `content` String - (optional)
Displays a tray balloon. Displays a tray balloon.

View file

@ -249,7 +249,7 @@ Emitted when DevTools is focused / opened.
Returns: Returns:
* `event` Event * `event` Event
* `url` URL * `url` String
* `error` String - The error code * `error` String - The error code
* `certificate` [Certificate](structures/certificate.md) * `certificate` [Certificate](structures/certificate.md)
* `callback` Function * `callback` Function
@ -489,7 +489,7 @@ Emitted when the devtools window instructs the webContents to reload
#### `contents.loadURL(url[, options])` #### `contents.loadURL(url[, options])`
* `url` URL * `url` String
* `options` Object (optional) * `options` Object (optional)
* `httpReferrer` String (optional) - A HTTP Referrer url. * `httpReferrer` String (optional) - A HTTP Referrer url.
* `userAgent` String (optional) - A user agent originating the request. * `userAgent` String (optional) - A user agent originating the request.
@ -777,14 +777,14 @@ Inserts `text` to the focused element.
* `text` String - Content to be searched, must not be empty. * `text` String - Content to be searched, must not be empty.
* `options` Object (optional) * `options` Object (optional)
* `forward` Boolean - Whether to search forward or backward, defaults to `true`. * `forward` Boolean - (optional) Whether to search forward or backward, defaults to `true`.
* `findNext` Boolean - Whether the operation is first request or a follow up, * `findNext` Boolean - (optional) Whether the operation is first request or a follow up,
defaults to `false`. defaults to `false`.
* `matchCase` Boolean - Whether search should be case-sensitive, * `matchCase` Boolean - (optional) Whether search should be case-sensitive,
defaults to `false`. defaults to `false`.
* `wordStart` Boolean - Whether to look only at the start of words. * `wordStart` Boolean - (optional) Whether to look only at the start of words.
defaults to `false`. defaults to `false`.
* `medialCapitalAsWordStart` Boolean - When combined with `wordStart`, * `medialCapitalAsWordStart` Boolean - (optional) When combined with `wordStart`,
accepts a match in the middle of a word if the match begins with an accepts a match in the middle of a word if the match begins with an
uppercase letter followed by a lowercase or non-letter. uppercase letter followed by a lowercase or non-letter.
Accepts several other intra-word matches, defaults to `false`. Accepts several other intra-word matches, defaults to `false`.
@ -860,14 +860,14 @@ Use `page-break-before: always; ` CSS style to force to print to a new page.
#### `contents.printToPDF(options, callback)` #### `contents.printToPDF(options, callback)`
* `options` Object * `options` Object
* `marginsType` Integer - Specifies the type of margins to use. Uses 0 for * `marginsType` Integer - (optional) Specifies the type of margins to use. Uses 0 for
default margin, 1 for no margin, and 2 for minimum margin. default margin, 1 for no margin, and 2 for minimum margin.
* `pageSize` String - Specify page size of the generated PDF. Can be `A3`, * `pageSize` String - (optional) Specify page size of the generated PDF. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` `A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`
and `width` in microns. and `width` in microns.
* `printBackground` Boolean - Whether to print CSS backgrounds. * `printBackground` Boolean - (optional) Whether to print CSS backgrounds.
* `printSelectionOnly` Boolean - Whether to print selection only. * `printSelectionOnly` Boolean - (optional) Whether to print selection only.
* `landscape` Boolean - `true` for landscape, `false` for portrait. * `landscape` Boolean - (optional) `true` for landscape, `false` for portrait.
* `callback` Function * `callback` Function
* `error` Error * `error` Error
* `data` Buffer * `data` Buffer