Merge pull request #10081 from renaesop/master
Add a callback option to `webContents.print`
This commit is contained in:
commit
ecff620528
4 changed files with 30 additions and 8 deletions
|
@ -950,13 +950,15 @@ Get the system printer list.
|
|||
|
||||
Returns [`PrinterInfo[]`](structures/printer-info.md)
|
||||
|
||||
#### `contents.print([options])`
|
||||
#### `contents.print([options], [callback])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `silent` Boolean (optional) - Don't ask user for print settings. Default is `false`.
|
||||
* `printBackground` Boolean (optional) - Also prints the background color and image of
|
||||
the web page. Default is `false`.
|
||||
* `deviceName` String (optional) - Set the printer device name to use. Default is `''`.
|
||||
* `callback` Function (optional)
|
||||
* success` Boolean - Indicates success of the print call.
|
||||
|
||||
Prints window's web page. When `silent` is set to `true`, Electron will pick
|
||||
the system's default printer if `deviceName` is empty and the default settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue