document arguments for webview methods
This commit is contained in:
parent
5ee7434a54
commit
23eecac288
1 changed files with 23 additions and 1 deletions
|
@ -537,20 +537,42 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
|
|||
|
||||
### `<webview>.print([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `silent` Boolean - Don't ask user for print settings. Default is `false`.
|
||||
* `printBackground` Boolean - Also prints the background color and image of
|
||||
the web page. Default is `false`.
|
||||
|
||||
Prints `webview`'s web page. Same as `webContents.print([options])`.
|
||||
|
||||
### `<webview>.printToPDF(options, callback)`
|
||||
|
||||
* `options` Object
|
||||
* `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 - (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 - (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
|
||||
|
||||
Prints `webview`'s web page as PDF, Same as `webContents.printToPDF(options, callback)`.
|
||||
|
||||
### `<webview>.capturePage([rect, ]callback)`
|
||||
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The area of the page to be captured
|
||||
* `callback` Function
|
||||
* `image` [NativeImage](native-image.md)
|
||||
|
||||
Captures a snapshot of the `webview`'s page. Same as `webContents.capturePage([rect, ]callback)`.
|
||||
|
||||
### `<webview>.send(channel[, arg1][, arg2][, ...])`
|
||||
|
||||
* `channel` String
|
||||
* `arg` (optional)
|
||||
* `...args` any[]
|
||||
|
||||
Send an asynchronous message to renderer process via `channel`, you can also
|
||||
send arbitrary arguments. The renderer process can handle the message by
|
||||
|
|
Loading…
Reference in a new issue