fix: crash in window.print() (#19690)
* fix: crash in window.print() * add preliminary tests
This commit is contained in:
parent
ba5ee79af8
commit
e8fa248571
4 changed files with 47 additions and 15 deletions
|
@ -1271,11 +1271,7 @@ Returns [`PrinterInfo[]`](structures/printer-info.md).
|
|||
* `failureReason` String - Called back if the print fails; can be `cancelled` or `failed`.
|
||||
|
||||
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
|
||||
for printing.
|
||||
|
||||
Calling `window.print()` in web page is equivalent to calling
|
||||
`webContents.print({ silent: false, printBackground: false, deviceName: '' })`.
|
||||
the system's default printer if `deviceName` is empty and the default settings for printing.
|
||||
|
||||
Use `page-break-before: always;` CSS style to force to print to a new page.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue