electron/lib/common/web-view-methods.ts

80 lines
1.4 KiB
TypeScript
Raw Normal View History

// Public-facing API methods.
export const 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',
'centerSelection',
'paste',
'pasteAndMatchStyle',
'delete',
'selectAll',
'unselect',
'scrollToTop',
'scrollToBottom',
'adjustSelection',
'replace',
'replaceMisspelling',
'findInPage',
'stopFindInPage',
'downloadURL',
'inspectSharedWorker',
'inspectServiceWorker',
'showDefinitionForSelection',
'getZoomFactor',
'getZoomLevel',
'setZoomFactor',
'setZoomLevel'
2020-03-20 20:28:31 +00:00
]);
export const properties = new Set([
'audioMuted',
'userAgent',
'zoomLevel',
'zoomFactor',
'frameRate'
2020-03-20 20:28:31 +00:00
]);
export const asyncMethods = new Set([
'capturePage',
'loadURL',
'executeJavaScript',
'insertCSS',
'insertText',
2019-06-17 15:39:36 +00:00
'removeInsertedCSS',
'send',
'sendToFrame',
'sendInputEvent',
'setLayoutZoomLevelLimits',
'setVisualZoomLevelLimits',
'print',
'printToPDF'
2020-03-20 20:28:31 +00:00
]);