docs: Remove unnecessary "properties: " suffix
This commit is contained in:
parent
2b406ccaf7
commit
fded8d80b1
4 changed files with 56 additions and 68 deletions
|
@ -458,7 +458,7 @@ Returns a boolean, whether the window is in fullscreen mode.
|
||||||
* `aspectRatio` The aspect ratio we want to maintain for some portion of the
|
* `aspectRatio` The aspect ratio we want to maintain for some portion of the
|
||||||
content view.
|
content view.
|
||||||
* `extraSize` Object (optional) - The extra size not to be included while
|
* `extraSize` Object (optional) - The extra size not to be included while
|
||||||
maintaining the aspect ratio. Properties:
|
maintaining the aspect ratio.
|
||||||
* `width` Integer
|
* `width` Integer
|
||||||
* `height` Integer
|
* `height` Integer
|
||||||
|
|
||||||
|
@ -478,13 +478,11 @@ height areas you have within the overall content view.
|
||||||
|
|
||||||
### `win.setBounds(options[, animate])`
|
### `win.setBounds(options[, animate])`
|
||||||
|
|
||||||
* `options` Object, properties:
|
* `options` Object
|
||||||
|
|
||||||
* `x` Integer
|
* `x` Integer
|
||||||
* `y` Integer
|
* `y` Integer
|
||||||
* `width` Integer
|
* `width` Integer
|
||||||
* `height` Integer
|
* `height` Integer
|
||||||
|
|
||||||
* `animate` Boolean (optional) _OS X_
|
* `animate` Boolean (optional) _OS X_
|
||||||
|
|
||||||
Resizes and moves the window to `width`, `height`, `x`, `y`.
|
Resizes and moves the window to `width`, `height`, `x`, `y`.
|
||||||
|
@ -729,7 +727,7 @@ Whether the window's document has been edited.
|
||||||
|
|
||||||
### `win.capturePage([rect, ]callback)`
|
### `win.capturePage([rect, ]callback)`
|
||||||
|
|
||||||
* `rect` Object (optional)- The area of page to be captured, properties:
|
* `rect` Object (optional) - The area of page to be captured
|
||||||
* `x` Integer
|
* `x` Integer
|
||||||
* `y` Integer
|
* `y` Integer
|
||||||
* `width` Integer
|
* `width` Integer
|
||||||
|
@ -802,27 +800,7 @@ Returns whether the window has a shadow. On Windows and Linux always returns
|
||||||
|
|
||||||
### `win.setThumbarButtons(buttons)` _Windows 7+_
|
### `win.setThumbarButtons(buttons)` _Windows 7+_
|
||||||
|
|
||||||
`buttons` Array of `button` Objects:
|
* `buttons` Array
|
||||||
|
|
||||||
`button` Object, properties:
|
|
||||||
|
|
||||||
* `icon` [NativeImage](native-image.md) - The icon showing in thumbnail
|
|
||||||
toolbar.
|
|
||||||
* `tooltip` String (optional) - The text of the button's tooltip.
|
|
||||||
* `flags` Array (optional) - Control specific states and behaviors
|
|
||||||
of the button. By default, it uses `enabled`. It can include following
|
|
||||||
Strings:
|
|
||||||
* `enabled` - The button is active and available to the user.
|
|
||||||
* `disabled` - The button is disabled. It is present, but has a visual
|
|
||||||
state indicating it will not respond to user action.
|
|
||||||
* `dismissonclick` - When the button is clicked, the taskbar button's
|
|
||||||
flyout closes immediately.
|
|
||||||
* `nobackground` - Do not draw a button border, use only the image.
|
|
||||||
* `hidden` - The button is not shown to the user.
|
|
||||||
* `noninteractive` - The button is enabled but not interactive; no
|
|
||||||
pressed button state is drawn. This value is intended for instances
|
|
||||||
where the button is used in a notification.
|
|
||||||
* `click` - Function
|
|
||||||
|
|
||||||
Add a thumbnail toolbar with a specified set of buttons to the thumbnail image
|
Add a thumbnail toolbar with a specified set of buttons to the thumbnail image
|
||||||
of a window in a taskbar button layout. Returns a `Boolean` object indicates
|
of a window in a taskbar button layout. Returns a `Boolean` object indicates
|
||||||
|
@ -833,6 +811,29 @@ the limited room. Once you setup the thumbnail toolbar, the toolbar cannot be
|
||||||
removed due to the platform's limitation. But you can call the API with an empty
|
removed due to the platform's limitation. But you can call the API with an empty
|
||||||
array to clean the buttons.
|
array to clean the buttons.
|
||||||
|
|
||||||
|
The `buttons` is an array of `Button` objects:
|
||||||
|
|
||||||
|
* `Button` Object
|
||||||
|
* `icon` [NativeImage](native-image.md) - The icon showing in thumbnail
|
||||||
|
toolbar.
|
||||||
|
* `click` Function
|
||||||
|
* `tooltip` String (optional) - The text of the button's tooltip.
|
||||||
|
* `flags` Array (optional) - Control specific states and behaviors of the
|
||||||
|
button. By default, it is `['enabled']`.
|
||||||
|
|
||||||
|
The `flags` is an array that can include following `String`s:
|
||||||
|
|
||||||
|
* `enabled` - The button is active and available to the user.
|
||||||
|
* `disabled` - The button is disabled. It is present, but has a visual state
|
||||||
|
indicating it will not respond to user action.
|
||||||
|
* `dismissonclick` - When the button is clicked, the thumbnail window closes
|
||||||
|
immediately.
|
||||||
|
* `nobackground` - Do not draw a button border, use only the image.
|
||||||
|
* `hidden` - The button is not shown to the user.
|
||||||
|
* `noninteractive` - The button is enabled but not interactive; no pressed
|
||||||
|
button state is drawn. This value is intended for instances where the button
|
||||||
|
is used in a notification.
|
||||||
|
|
||||||
### `win.showDefinitionForSelection()` _OS X_
|
### `win.showDefinitionForSelection()` _OS X_
|
||||||
|
|
||||||
Shows pop-up dictionary that searches the selected word on the page.
|
Shows pop-up dictionary that searches the selected word on the page.
|
||||||
|
|
|
@ -22,19 +22,16 @@ The `crash-reporter` module has the following methods:
|
||||||
|
|
||||||
### `crashReporter.start(options)`
|
### `crashReporter.start(options)`
|
||||||
|
|
||||||
`options` Object, properties:
|
* `options` Object
|
||||||
|
* `companyName` String
|
||||||
* `productName` String, default: Electron.
|
* `submitURL` String - URL that crash reports will be sent to as POST.
|
||||||
* `companyName` String (**required**)
|
* `productName` String (optional) - Default is `Electron`.
|
||||||
* `submitURL` String, (**required**)
|
* `autoSubmit` Boolean - Send the crash report without user interaction.
|
||||||
* URL that crash reports will be sent to as POST.
|
Default is `true`.
|
||||||
* `autoSubmit` Boolean, default: `true`.
|
* `ignoreSystemCrashHandler` Boolean - Default is `false`.
|
||||||
* Send the crash report without user interaction.
|
* `extra` Object - An object you can define that will be sent along with the
|
||||||
* `ignoreSystemCrashHandler` Boolean, default: `false`.
|
report. Only string properties are sent correctly, Nested objects are not
|
||||||
* `extra` Object
|
supported.
|
||||||
* An object you can define that will be sent along with the report.
|
|
||||||
* Only string properties are sent correctly.
|
|
||||||
* Nested objects are not supported.
|
|
||||||
|
|
||||||
You are required to call this method before using other `crashReporter`
|
You are required to call this method before using other `crashReporter`
|
||||||
APIs.
|
APIs.
|
||||||
|
|
|
@ -310,7 +310,7 @@ The `webContents` object has the following instance methods:
|
||||||
### `webContents.loadURL(url[, options])`
|
### `webContents.loadURL(url[, options])`
|
||||||
|
|
||||||
* `url` URL
|
* `url` URL
|
||||||
* `options` Object (optional), properties:
|
* `options` Object (optional)
|
||||||
* `httpReferrer` String - A HTTP Referrer url.
|
* `httpReferrer` String - A HTTP Referrer url.
|
||||||
* `userAgent` String - A user agent originating the request.
|
* `userAgent` String - A user agent originating the request.
|
||||||
* `extraHeaders` String - Extra headers separated by "\n"
|
* `extraHeaders` String - Extra headers separated by "\n"
|
||||||
|
@ -556,11 +556,10 @@ when the JS promise is rejected.
|
||||||
|
|
||||||
### `webContents.print([options])`
|
### `webContents.print([options])`
|
||||||
|
|
||||||
`options` Object (optional), properties:
|
* `options` Object (optional)
|
||||||
|
* `silent` Boolean - Don't ask user for print settings. Default is `false`.
|
||||||
* `silent` Boolean - Don't ask user for print settings, defaults to `false`
|
* `printBackground` Boolean - Also prints the background color and image of
|
||||||
* `printBackground` Boolean - Also prints the background color and image of
|
the web page. Default is `false`.
|
||||||
the web page, defaults to `false`.
|
|
||||||
|
|
||||||
Prints window's web page. When `silent` is set to `false`, Electron will pick
|
Prints window's web page. When `silent` is set to `false`, Electron will pick
|
||||||
up system's default printer and default settings for printing.
|
up system's default printer and default settings for printing.
|
||||||
|
@ -574,31 +573,22 @@ size.
|
||||||
|
|
||||||
### `webContents.printToPDF(options, callback)`
|
### `webContents.printToPDF(options, callback)`
|
||||||
|
|
||||||
`options` Object, properties:
|
* `options` Object
|
||||||
|
* `marginsType` Integer - Specifies the type of margins to use. Uses 0 for
|
||||||
* `marginsType` Integer - Specify the type of margins to use
|
default margin, 1 for no margin, and 2 for minimum margin.
|
||||||
* 0 - default
|
* `pageSize` String - Specify page size of the generated PDF. Can be `A3`,
|
||||||
* 1 - none
|
`A4`, `A5`, `Legal`, `Letter` and `Tabloid`.
|
||||||
* 2 - minimum
|
* `printBackground` Boolean - Whether to print CSS backgrounds.
|
||||||
* `pageSize` String - Specify page size of the generated PDF.
|
* `printSelectionOnly` Boolean - Whether to print selection only.
|
||||||
* `A5`
|
* `landscape` Boolean - `true` for landscape, `false` for portrait.
|
||||||
* `A4`
|
* `callback` Function
|
||||||
* `A3`
|
|
||||||
* `Legal`
|
|
||||||
* `Letter`
|
|
||||||
* `Tabloid`
|
|
||||||
* `printBackground` Boolean - Whether to print CSS backgrounds.
|
|
||||||
* `printSelectionOnly` Boolean - Whether to print selection only.
|
|
||||||
* `landscape` Boolean - `true` for landscape, `false` for portrait.
|
|
||||||
|
|
||||||
`callback` Function - `function(error, data) {}`
|
|
||||||
|
|
||||||
* `error` Error
|
|
||||||
* `data` Buffer - PDF file content.
|
|
||||||
|
|
||||||
Prints window's web page as PDF with Chromium's preview printing custom
|
Prints window's web page as PDF with Chromium's preview printing custom
|
||||||
settings.
|
settings.
|
||||||
|
|
||||||
|
The `callback` will be called with `callback(error, data)` on completion. The
|
||||||
|
`data` is a `Buffer` that contains the generated PDF data.
|
||||||
|
|
||||||
By default, an empty `options` will be regarded as:
|
By default, an empty `options` will be regarded as:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@ -651,7 +641,7 @@ Removes the specified path from DevTools workspace.
|
||||||
|
|
||||||
### `webContents.openDevTools([options])`
|
### `webContents.openDevTools([options])`
|
||||||
|
|
||||||
* `options` Object (optional). Properties:
|
* `options` Object (optional)
|
||||||
* `detach` Boolean - opens DevTools in a new window
|
* `detach` Boolean - opens DevTools in a new window
|
||||||
|
|
||||||
Opens the devtools.
|
Opens the devtools.
|
||||||
|
|
|
@ -184,7 +184,7 @@ webview.addEventListener("dom-ready", function() {
|
||||||
### `<webview>.loadURL(url[, options])`
|
### `<webview>.loadURL(url[, options])`
|
||||||
|
|
||||||
* `url` URL
|
* `url` URL
|
||||||
* `options` Object (optional), properties:
|
* `options` Object (optional)
|
||||||
* `httpReferrer` String - A HTTP Referrer url.
|
* `httpReferrer` String - A HTTP Referrer url.
|
||||||
* `userAgent` String - A user agent originating the request.
|
* `userAgent` String - A user agent originating the request.
|
||||||
* `extraHeaders` String - Extra headers separated by "\n"
|
* `extraHeaders` String - Extra headers separated by "\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue