feat: make async webContents / <webview> methods return a Promise (#18792)
This commit is contained in:
parent
632bbf948d
commit
deebde66f9
6 changed files with 32 additions and 35 deletions
|
@ -180,7 +180,7 @@ const webFrameMethods = [
|
|||
|
||||
for (const method of webFrameMethods) {
|
||||
WebContents.prototype[method] = function (...args) {
|
||||
ipcMainUtils.invokeInWebContents(this, false, 'ELECTRON_INTERNAL_RENDERER_WEB_FRAME_METHOD', method, ...args)
|
||||
return ipcMainUtils.invokeInWebContents(this, false, 'ELECTRON_INTERNAL_RENDERER_WEB_FRAME_METHOD', method, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue