2018-12-04 15:12:21 +00:00
|
|
|
// Public-facing API methods.
|
2019-07-17 17:23:52 +00:00
|
|
|
export const syncMethods = new Set([
|
2018-12-04 15:12:21 +00:00
|
|
|
'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',
|
2023-05-03 01:14:29 +00:00
|
|
|
'centerSelection',
|
2018-12-04 15:12:21 +00:00
|
|
|
'paste',
|
|
|
|
'pasteAndMatchStyle',
|
|
|
|
'delete',
|
|
|
|
'selectAll',
|
|
|
|
'unselect',
|
2023-05-03 01:14:29 +00:00
|
|
|
'scrollToTop',
|
|
|
|
'scrollToBottom',
|
|
|
|
'adjustSelection',
|
2018-12-04 15:12:21 +00:00
|
|
|
'replace',
|
|
|
|
'replaceMisspelling',
|
|
|
|
'findInPage',
|
|
|
|
'stopFindInPage',
|
|
|
|
'downloadURL',
|
2019-02-01 18:44:24 +00:00
|
|
|
'inspectSharedWorker',
|
2018-12-04 15:12:21 +00:00
|
|
|
'inspectServiceWorker',
|
|
|
|
'showDefinitionForSelection',
|
2019-01-21 07:40:27 +00:00
|
|
|
'getZoomFactor',
|
|
|
|
'getZoomLevel',
|
2018-12-04 15:12:21 +00:00
|
|
|
'setZoomFactor',
|
|
|
|
'setZoomLevel'
|
2020-03-20 20:28:31 +00:00
|
|
|
]);
|
2018-12-04 15:12:21 +00:00
|
|
|
|
2020-03-03 22:25:14 +00:00
|
|
|
export const properties = new Set([
|
|
|
|
'audioMuted',
|
|
|
|
'userAgent',
|
|
|
|
'zoomLevel',
|
|
|
|
'zoomFactor',
|
|
|
|
'frameRate'
|
2020-03-20 20:28:31 +00:00
|
|
|
]);
|
2020-03-03 22:25:14 +00:00
|
|
|
|
2019-07-17 17:23:52 +00:00
|
|
|
export const asyncMethods = new Set([
|
2021-09-07 17:37:45 +00:00
|
|
|
'capturePage',
|
2019-07-10 13:20:28 +00:00
|
|
|
'loadURL',
|
2019-06-17 09:10:02 +00:00
|
|
|
'executeJavaScript',
|
2018-12-04 15:12:21 +00:00
|
|
|
'insertCSS',
|
|
|
|
'insertText',
|
2019-06-17 15:39:36 +00:00
|
|
|
'removeInsertedCSS',
|
2018-12-04 15:12:21 +00:00
|
|
|
'send',
|
2021-08-25 07:46:46 +00:00
|
|
|
'sendToFrame',
|
2018-12-04 15:12:21 +00:00
|
|
|
'sendInputEvent',
|
|
|
|
'setLayoutZoomLevelLimits',
|
|
|
|
'setVisualZoomLevelLimits',
|
2019-06-17 09:10:02 +00:00
|
|
|
'print',
|
2019-02-11 19:20:04 +00:00
|
|
|
'printToPDF'
|
2020-03-20 20:28:31 +00:00
|
|
|
]);
|