Merge pull request #8078 from electron/dts-docs-update-again
Update Docs
This commit is contained in:
		
				commit
				
					
						f99dabbac6
					
				
			
		
					 14 changed files with 66 additions and 42 deletions
				
			
		|  | @ -189,7 +189,7 @@ Returns: | |||
| 
 | ||||
| * `event` Event | ||||
| * `webContents` [WebContents](web-contents.md) | ||||
| * `url` URL | ||||
| * `url` String | ||||
| * `error` String - The error code | ||||
| * `certificate` [Certificate](structures/certificate.md) | ||||
| * `callback` Function | ||||
|  | @ -845,7 +845,7 @@ When `informational` is passed, the dock icon will bounce for one second. | |||
| However, the request remains active until either the application becomes active | ||||
| or the request is canceled. | ||||
| 
 | ||||
| Returns an ID representing the request. | ||||
| Returns `Integer` an ID representing the request. | ||||
| 
 | ||||
| ### `app.dock.cancelBounce(id)` _macOS_ | ||||
| 
 | ||||
|  | @ -891,7 +891,7 @@ Sets the application's [dock menu][dock-menu]. | |||
| 
 | ||||
| ### `app.dock.setIcon(image)` _macOS_ | ||||
| 
 | ||||
| * `image` [NativeImage](native-image.md) | ||||
| * `image` ([NativeImage](native-image.md) | String) | ||||
| 
 | ||||
| Sets the `image` associated with this dock icon. | ||||
| 
 | ||||
|  |  | |||
|  | @ -202,10 +202,10 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. | |||
|   * `thickFrame` Boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on | ||||
|     Windows, which adds standard window frame. Setting it to `false` will remove | ||||
|     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`, | ||||
|     `menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`. | ||||
|   * `zoomToPageWidth` Boolean - Controls the behavior on macOS when | ||||
|   * `zoomToPageWidth` Boolean - (optional) Controls the behavior on macOS when | ||||
|     option-clicking the green stoplight button on the toolbar or by clicking the | ||||
|     Window > Zoom menu item. If `true`, the window will grow to the preferred | ||||
|     width of the web page when zoomed, `false` will cause it to zoom to the | ||||
|  |  | |||
|  | @ -79,15 +79,15 @@ with `callback(error, cookies)` on complete. | |||
| 
 | ||||
| * `details` Object | ||||
|   * `url` String - The url to associate the cookie with. | ||||
|   * `name` String - The name of the cookie. Empty by default if omitted. | ||||
|   * `value` String - The value of the cookie. Empty by default if omitted. | ||||
|   * `domain` String - The domain of the cookie. Empty by default if omitted. | ||||
|   * `path` String - The path of the cookie. Empty by default if omitted. | ||||
|   * `secure` Boolean - Whether the cookie should be marked as Secure. Defaults to | ||||
|   * `name` String - (optional) The name of the cookie. Empty by default if omitted. | ||||
|   * `value` String - (optional) The value of the cookie. Empty by default if omitted. | ||||
|   * `domain` String - (optional) The domain of the cookie. Empty by default if omitted. | ||||
|   * `path` String - (optional) The path of the cookie. Empty by default if omitted. | ||||
|   * `secure` Boolean - (optional) Whether the cookie should be marked as Secure. Defaults to | ||||
|     false. | ||||
|   * `httpOnly` Boolean - Whether the cookie should be marked as HTTP only. | ||||
|   * `httpOnly` Boolean - (optional) Whether the cookie should be marked as HTTP only. | ||||
|     Defaults to false. | ||||
|   * `expirationDate` Double -	The expiration date of the cookie as the number of | ||||
|   * `expirationDate` Double -	(optional) The expiration date of the cookie as the number of | ||||
|     seconds since the UNIX epoch. If omitted then the cookie becomes a session | ||||
|     cookie and will not be retained between sessions. | ||||
| * `callback` Function | ||||
|  |  | |||
|  | @ -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 | ||||
| Integer-valued readable properties that return respectively the HTTP major and | ||||
| 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. | ||||
|  |  | |||
|  | @ -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. | ||||
| 
 | ||||
| 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 | ||||
|  |  | |||
|  | @ -121,7 +121,7 @@ treated as a standard scheme. | |||
|     * `method` String | ||||
|     * `uploadData` [UploadData[]](structures/upload-data.md) | ||||
|   * `callback` Function | ||||
|     * `buffer` Buffer (optional) | ||||
|     * `buffer` (Buffer | [MimeTypedBuffer](structures/mime-typed-buffer.md)) (optional) | ||||
| * `completion` Function (optional) | ||||
|   * `error` Error | ||||
| 
 | ||||
|  |  | |||
|  | @ -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 | ||||
|    host matches one of: "127.0.0.1", "::1", "localhost". | ||||
| 
 | ||||
| ### `ses.resolveProxy(url, callback)` | ||||
| #### `ses.resolveProxy(url, callback)` | ||||
| 
 | ||||
| * `url` URL | ||||
| * `callback` Function | ||||
|  |  | |||
|  | @ -2,13 +2,13 @@ | |||
| 
 | ||||
| * `name` String - The name of the cookie. | ||||
| * `value` String - The value of the cookie. | ||||
| * `domain` String - The domain of the cookie. | ||||
| * `hostOnly` String - Whether the cookie is a host-only cookie. | ||||
| * `path` String - The path of the cookie. | ||||
| * `secure` Boolean - Whether the cookie is marked as secure. | ||||
| * `httpOnly` Boolean - Whether the cookie is marked as HTTP only. | ||||
| * `session` Boolean - Whether the cookie is a session cookie or a persistent | ||||
| * `domain` String - (optional) The domain of the cookie. | ||||
| * `hostOnly` Boolean - (optional) Whether the cookie is a host-only cookie. | ||||
| * `path` String - (optional) The path of the cookie. | ||||
| * `secure` Boolean - (optional) Whether the cookie is marked as secure. | ||||
| * `httpOnly` Boolean - (optional) Whether the cookie is marked as HTTP only. | ||||
| * `session` Boolean - (optional) Whether the cookie is a session cookie or a persistent | ||||
|   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 | ||||
|   cookies. | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| # 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` | ||||
|     category. There can be only one such category, and it will always be | ||||
|     displayed at the bottom of the Jump List. | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| # 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. | ||||
|   * `separator` - Can be used to separate items in the standard `Tasks` | ||||
|     category. | ||||
|  | @ -18,11 +18,11 @@ | |||
|   Should only be set if `type` is `task`. | ||||
| * `description` String - (optional) Description of the task (displayed in a tooltip). | ||||
|   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 | ||||
|   (e.g. `.ico`, `.exe`, `.dll`). You can usually specify `process.execPath` to | ||||
|   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 | ||||
|   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. | ||||
|  |  | |||
							
								
								
									
										4
									
								
								docs/api/structures/mime-typed-buffer.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docs/api/structures/mime-typed-buffer.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| # MimeTypedBuffer Object | ||||
| 
 | ||||
| * `mimeType` String - The mimeType of the Buffer that you are sending | ||||
| * `buffer` Buffer - The actual Buffer content | ||||
|  | @ -154,7 +154,7 @@ Destroys the tray icon immediately. | |||
| 
 | ||||
| #### `tray.setImage(image)` | ||||
| 
 | ||||
| * `image` [NativeImage](native-image.md) | ||||
| * `image` ([NativeImage](native-image.md) | String) | ||||
| 
 | ||||
| Sets the `image` associated with this tray icon. | ||||
| 
 | ||||
|  | @ -210,9 +210,9 @@ win.on('hide', () => { | |||
| #### `tray.displayBalloon(options)` _Windows_ | ||||
| 
 | ||||
| * `options` Object | ||||
|   * `icon` [NativeImage](native-image.md) | ||||
|   * `title` String | ||||
|   * `content` String | ||||
|   * `icon` ([NativeImage](native-image.md) | String) - (optional) | ||||
|   * `title` String - (optional) | ||||
|   * `content` String - (optional) | ||||
| 
 | ||||
| Displays a tray balloon. | ||||
| 
 | ||||
|  |  | |||
|  | @ -267,7 +267,7 @@ Emitted when DevTools is focused / opened. | |||
| Returns: | ||||
| 
 | ||||
| * `event` Event | ||||
| * `url` URL | ||||
| * `url` String | ||||
| * `error` String - The error code | ||||
| * `certificate` [Certificate](structures/certificate.md) | ||||
| * `callback` Function | ||||
|  | @ -507,7 +507,7 @@ Emitted when the devtools window instructs the webContents to reload | |||
| 
 | ||||
| #### `contents.loadURL(url[, options])` | ||||
| 
 | ||||
| * `url` URL | ||||
| * `url` String | ||||
| * `options` Object (optional) | ||||
|   * `httpReferrer` String (optional) - A HTTP Referrer url. | ||||
|   * `userAgent` String (optional) - A user agent originating the request. | ||||
|  | @ -795,14 +795,14 @@ Inserts `text` to the focused element. | |||
| 
 | ||||
| * `text` String - Content to be searched, must not be empty. | ||||
| * `options` Object (optional) | ||||
|   * `forward` Boolean - Whether to search forward or backward, defaults to `true`. | ||||
|   * `findNext` Boolean - Whether the operation is first request or a follow up, | ||||
|   * `forward` Boolean - (optional) Whether to search forward or backward, defaults to `true`. | ||||
|   * `findNext` Boolean - (optional) Whether the operation is first request or a follow up, | ||||
|     defaults to `false`. | ||||
|   * `matchCase` Boolean - Whether search should be case-sensitive, | ||||
|   * `matchCase` Boolean - (optional) Whether search should be case-sensitive, | ||||
|     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`. | ||||
|   * `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 | ||||
|     uppercase letter followed by a lowercase or non-letter. | ||||
|     Accepts several other intra-word matches, defaults to `false`. | ||||
|  | @ -878,14 +878,14 @@ Use `page-break-before: always; ` CSS style to force to print to a new page. | |||
| #### `contents.printToPDF(options, callback)` | ||||
| 
 | ||||
| * `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. | ||||
|   * `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` | ||||
|     and `width` in microns. | ||||
|   * `printBackground` Boolean - Whether to print CSS backgrounds. | ||||
|   * `printSelectionOnly` Boolean - Whether to print selection only. | ||||
|   * `landscape` Boolean - `true` for landscape, `false` for portrait. | ||||
|   * `printBackground` Boolean - (optional) Whether to print CSS backgrounds. | ||||
|   * `printSelectionOnly` Boolean - (optional) Whether to print selection only. | ||||
|   * `landscape` Boolean - (optional) `true` for landscape, `false` for portrait. | ||||
| * `callback` Function | ||||
|   * `error` Error | ||||
|   * `data` Buffer | ||||
|  |  | |||
|  | @ -66,6 +66,8 @@ Sets the maximum and minimum layout-based (i.e. non-visual) zoom level. | |||
| * `language` String | ||||
| * `autoCorrectWord` Boolean | ||||
| * `provider` Object | ||||
|   * `spellCheck` Function - Returns `Boolean` | ||||
|     * `text` String | ||||
| 
 | ||||
| Sets a provider for spell checking in input fields and text areas. | ||||
| 
 | ||||
|  | @ -127,10 +129,12 @@ webFrame.registerURLSchemeAsPrivileged('foo', { bypassCSP: false }) | |||
| 
 | ||||
| Inserts `text` to the focused element. | ||||
| 
 | ||||
| ### `webFrame.executeJavaScript(code[, userGesture])` | ||||
| ### `webFrame.executeJavaScript(code[, userGesture, callback])` | ||||
| 
 | ||||
| * `code` String | ||||
| * `userGesture` Boolean (optional) - Default is `false`. | ||||
| * `callback` Function (optional) - Called after script has been executed. | ||||
|   * `result` Any | ||||
| 
 | ||||
| Evaluates `code` in page. | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kevin Sawicki
				Kevin Sawicki