faa2710485
* fix: make <webview>.loadURL async * docs: webview.loadURL returns Promise
68 lines
1.2 KiB
JavaScript
68 lines
1.2 KiB
JavaScript
'use strict'
|
|
|
|
// Public-facing API methods.
|
|
exports.syncMethods = new Set([
|
|
'getURL',
|
|
'getTitle',
|
|
'isLoading',
|
|
'isLoadingMainFrame',
|
|
'isWaitingForResponse',
|
|
'stop',
|
|
'reload',
|
|
'reloadIgnoringCache',
|
|
'canGoBack',
|
|
'canGoForward',
|
|
'canGoToOffset',
|
|
'clearHistory',
|
|
'goBack',
|
|
'goForward',
|
|
'goToIndex',
|
|
'goToOffset',
|
|
'isCrashed',
|
|
'setUserAgent',
|
|
'getUserAgent',
|
|
'openDevTools',
|
|
'closeDevTools',
|
|
'isDevToolsOpened',
|
|
'isDevToolsFocused',
|
|
'inspectElement',
|
|
'setAudioMuted',
|
|
'isAudioMuted',
|
|
'isCurrentlyAudible',
|
|
'undo',
|
|
'redo',
|
|
'cut',
|
|
'copy',
|
|
'paste',
|
|
'pasteAndMatchStyle',
|
|
'delete',
|
|
'selectAll',
|
|
'unselect',
|
|
'replace',
|
|
'replaceMisspelling',
|
|
'findInPage',
|
|
'stopFindInPage',
|
|
'downloadURL',
|
|
'inspectSharedWorker',
|
|
'inspectServiceWorker',
|
|
'showDefinitionForSelection',
|
|
'getZoomFactor',
|
|
'getZoomLevel',
|
|
'setZoomFactor',
|
|
'setZoomLevel'
|
|
])
|
|
|
|
exports.asyncMethods = new Set([
|
|
'loadURL',
|
|
'capturePage',
|
|
'executeJavaScript',
|
|
'insertCSS',
|
|
'insertText',
|
|
'removeInsertedCSS',
|
|
'send',
|
|
'sendInputEvent',
|
|
'setLayoutZoomLevelLimits',
|
|
'setVisualZoomLevelLimits',
|
|
'print',
|
|
'printToPDF'
|
|
])
|