feat: make async webContents / <webview> methods return a Promise (#18792)

This commit is contained in:
Milan Burda 2019-06-17 11:10:02 +02:00 committed by Alexey Kuzmin
parent 632bbf948d
commit deebde66f9
6 changed files with 32 additions and 35 deletions

View file

@ -53,18 +53,15 @@ exports.syncMethods = new Set([
'setZoomLevel'
])
exports.asyncCallbackMethods = new Set([
exports.asyncMethods = new Set([
'capturePage',
'executeJavaScript',
'insertCSS',
'insertText',
'send',
'sendInputEvent',
'setLayoutZoomLevelLimits',
'setVisualZoomLevelLimits',
'print'
])
exports.asyncPromiseMethods = new Set([
'capturePage',
'executeJavaScript',
'print',
'printToPDF'
])