feat: add webContents.getPrintersAsync()
(#31023)
This deprecates the synchronous and blocking `webContents.getPrinters()` function and introduces `webContents.getPrintersAsync()`, which is asynchronous and non-blocking. Signed-off-by: Darshan Sen <darshan.sen@postman.com>
This commit is contained in:
parent
b936f5e14a
commit
8f51d3e1bf
5 changed files with 70 additions and 4 deletions
1
typings/internal-electron.d.ts
vendored
1
typings/internal-electron.d.ts
vendored
|
@ -71,6 +71,7 @@ declare namespace Electron {
|
|||
_printToPDF(options: any): Promise<Buffer>;
|
||||
_print(options: any, callback?: (success: boolean, failureReason: string) => void): void;
|
||||
_getPrinters(): Electron.PrinterInfo[];
|
||||
_getPrintersAsync(): Promise<Electron.PrinterInfo[]>;
|
||||
_init(): void;
|
||||
canGoToIndex(index: number): boolean;
|
||||
getActiveIndex(): number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue