Skip to content

ElectronWebContents

Unofficial

Electron WebContents for rendering and controlling a web page.

Note: the upstream static factories (fromId, fromDevToolsTargetId, getAllWebContents, getFocusedWebContents) cannot be expressed on a plain interface and are therefore omitted here.

Import:

import type { ElectronWebContents } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ElectronWebContents

Properties

PropertyTypeDescription
audioMutedbooleanWhether this page is muted.
backgroundThrottlingbooleanWhether this web contents throttles animations and timers when the page becomes backgrounded.
debuggerElectronDebuggerThe debugger instance for this web contents.
devToolsWebContentsElectronWebContents | nullThe DevTools web contents associated with this web contents, or null when DevTools is closed.
frameRatenumberThe frame rate of the web contents. Only applicable when offscreen rendering is enabled.
hostWebContentsElectronWebContentsThe web contents that might own this web contents.
idnumberThe unique id of this web contents.
mainFrameElectronWebFrameMainThe top frame of the page's frame hierarchy.
noContextMenubooleanWhether Obsidian suppresses the default context menu of this web contents.
sessionSessionThe session used by this web contents.
userAgentstringThe user agent for this web page.
zoomFactornumberThe zoom factor for this web contents. The zoom factor is the zoom percent divided by 100.
zoomLevelnumberThe zoom level for this web contents.

Methods

MethodReturnsDescription
addListener(event, listener)thisRegisters a listener for the before-input-event event.
addListener(event, listener)thisRegisters a listener for the blur event.
addListener(event, listener)thisRegisters a listener for the certificate-error event.
addListener(event, listener)thisRegisters a listener for the console-message event.
addListener(event, listener)thisRegisters a listener for the context-menu event.
addListener(event, listener)thisRegisters a listener for the crashed event.
addListener(event, listener)thisRegisters a listener for the cursor-changed event.
addListener(event, listener)thisRegisters a listener for the destroyed event.
addListener(event, listener)thisRegisters a listener for the devtools-closed event.
addListener(event, listener)thisRegisters a listener for the devtools-focused event.
addListener(event, listener)thisRegisters a listener for the devtools-opened event.
addListener(event, listener)thisRegisters a listener for the devtools-reload-page event.
addListener(event, listener)thisRegisters a listener for the did-attach-webview event.
addListener(event, listener)thisRegisters a listener for the did-change-theme-color event.
addListener(event, listener)thisRegisters a listener for the did-create-window event.
addListener(event, listener)thisRegisters a listener for the did-fail-load event.
addListener(event, listener)thisRegisters a listener for the did-fail-provisional-load event.
addListener(event, listener)thisRegisters a listener for the did-finish-load event.
addListener(event, listener)thisRegisters a listener for the did-frame-finish-load event.
addListener(event, listener)thisRegisters a listener for the did-frame-navigate event.
addListener(event, listener)thisRegisters a listener for the did-navigate event.
addListener(event, listener)thisRegisters a listener for the did-navigate-in-page event.
addListener(event, listener)thisRegisters a listener for the did-redirect-navigation event.
addListener(event, listener)thisRegisters a listener for the did-start-loading event.
addListener(event, listener)thisRegisters a listener for the did-start-navigation event.
addListener(event, listener)thisRegisters a listener for the did-stop-loading event.
addListener(event, listener)thisRegisters a listener for the dom-ready event.
addListener(event, listener)thisRegisters a listener for the enter-html-full-screen event.
addListener(event, listener)thisRegisters a listener for the focus event.
addListener(event, listener)thisRegisters a listener for the found-in-page event.
addListener(event, listener)thisRegisters a listener for the frame-created event.
addListener(event, listener)thisRegisters a listener for the input-event event.
addListener(event, listener)thisRegisters a listener for the ipc-message event.
addListener(event, listener)thisRegisters a listener for the ipc-message-sync event.
addListener(event, listener)thisRegisters a listener for the leave-html-full-screen event.
addListener(event, listener)thisRegisters a listener for the login event.
addListener(event, listener)thisRegisters a listener for the media-paused event.
addListener(event, listener)thisRegisters a listener for the media-started-playing event.
addListener(event, listener)thisRegisters a listener for the new-window event.
addListener(event, listener)thisRegisters a listener for the page-favicon-updated event.
addListener(event, listener)thisRegisters a listener for the page-title-updated event.
addListener(event, listener)thisRegisters a listener for the paint event.
addListener(event, listener)thisRegisters a listener for the plugin-crashed event.
addListener(event, listener)thisRegisters a listener for the preferred-size-changed event.
addListener(event, listener)thisRegisters a listener for the preload-error event.
addListener(event, listener)thisRegisters a listener for the render-process-gone event.
addListener(event, listener)thisRegisters a listener for the responsive event.
addListener(event, listener)thisRegisters a listener for the select-bluetooth-device event.
addListener(event, listener)thisRegisters a listener for the select-client-certificate event.
addListener(event, listener)thisRegisters a listener for the unresponsive event.
addListener(event, listener)thisRegisters a listener for the update-target-url event.
addListener(event, listener)thisRegisters a listener for the will-attach-webview event.
addListener(event, listener)thisRegisters a listener for the will-navigate event.
addListener(event, listener)thisRegisters a listener for the will-prevent-unload event.
addListener(event, listener)thisRegisters a listener for the will-redirect event.
addListener(event, listener)thisRegisters a listener for the zoom-changed event.
addWorkSpace(path)voidAdds the specified path to the DevTools workspace.
beginFrameSubscription(onlyDirty, callback)voidBegins subscribing for presentation events and captured frames.
beginFrameSubscription(callback)voidBegins subscribing for presentation events and captured frames.
canGoBack()booleanReturns whether the browser can go back to the previous web page.
canGoForward()booleanReturns whether the browser can go forward to the next web page.
canGoToOffset(offset)booleanReturns whether the web page can go to the given offset.
capturePage(rect?)Promise<ElectronNativeImage>Captures a snapshot of the page within rect. Omitting rect captures the whole visible page.
clearHistory()voidClears the navigation history.
closeDevTools()voidCloses the developer tools.
copy()voidExecutes the editing command copy in the web page.
copyImageAt(x, y)voidCopies the image at the given position to the clipboard.
cut()voidExecutes the editing command cut in the web page.
decrementCapturerCount(stayHidden?, stayAwake?)voidDecreases the capturer count by one.
delete()voidExecutes the editing command delete in the web page.
disableDeviceEmulation()voidDisables device emulation enabled by enableDeviceEmulation.
downloadURL(url)voidInitiates a download of the resource at url without navigating.
enableDeviceEmulation(parameters)voidEnables device emulation with the given parameters.
endFrameSubscription()voidEnds subscribing for frame presentation events.
executeJavaScript(code, userGesture?)Promise<unknown>Evaluates code in the page.
executeJavaScriptInIsolatedWorld(worldId, scripts, userGesture?)Promise<unknown>Works like executeJavaScript but evaluates scripts in an isolated context.
findInPage(text, options?)numberStarts a request to find all matches for text in the web page.
focus()voidFocuses the web page.
forcefullyCrashRenderer()voidForcefully terminates the renderer process currently hosting this web contents.
getAllSharedWorkers()ElectronSharedWorkerInfo[]Returns information about all shared workers.
getBackgroundThrottling()booleanReturns whether this web contents throttles animations and timers when backgrounded.
getFrameRate()numberReturns the current frame rate when offscreen rendering is enabled.
getMediaSourceId(requestWebContents)stringReturns the identifier of a web contents stream.
getOSProcessId()numberReturns the operating system pid of the associated renderer process.
getPrinters()ElectronPrinterInfo[]Returns the system printer list.
getPrintersAsync()Promise<ElectronPrinterInfo[]>Returns the system printer list.
getProcessId()numberReturns the Chromium internal pid of the associated renderer.
getTitle()stringReturns the title of the current web page.
getType()'backgroundPage' | 'browserView' | 'offscreen' | 'remote' | 'webview' | 'window'Returns the type of the web contents.
getURL()stringReturns the URL of the current web page.
getUserAgent()stringReturns the user agent for this web page.
getWebRTCIPHandlingPolicy()stringReturns the WebRTC IP handling policy.
getZoomFactor()numberReturns the current zoom factor.
getZoomLevel()numberReturns the current zoom level.
goBack()voidMakes the browser go back a web page.
goForward()voidMakes the browser go forward a web page.
goToIndex(index)voidNavigates the browser to the specified absolute web page index.
goToOffset(offset)voidNavigates to the specified offset from the current entry.
incrementCapturerCount(size?, stayHidden?, stayAwake?)voidIncreases the capturer count by one.
insertCSS(css, options?)Promise<string>Injects CSS into the current web page and returns a unique key for the inserted stylesheet.
insertText(text)Promise<void>Inserts text into the focused element.
inspectElement(x, y)voidStarts inspecting the element at the given position.
inspectServiceWorker()voidOpens the developer tools for the service worker context.
inspectSharedWorker()voidOpens the developer tools for the shared worker context.
inspectSharedWorkerById(workerId)voidInspects the shared worker based on its id.
invalidate()voidSchedules a full repaint of the window this web contents is in.
isAudioMuted()booleanReturns whether this page has been muted.
isBeingCaptured()booleanReturns whether this page is being captured.
isCrashed()booleanReturns whether the renderer process has crashed.
isCurrentlyAudible()booleanReturns whether audio is currently playing.
isDestroyed()booleanReturns whether the web page is destroyed.
isDevToolsFocused()booleanReturns whether the DevTools view is focused.
isDevToolsOpened()booleanReturns whether the DevTools is opened.
isFocused()booleanReturns whether the web page is focused.
isLoading()booleanReturns whether the web page is still loading resources.
isLoadingMainFrame()booleanReturns whether the main frame is still loading.
isOffscreen()booleanReturns whether offscreen rendering is enabled.
isPainting()booleanReturns whether it is currently painting when offscreen rendering is enabled.
isWaitingForResponse()booleanReturns whether the web page is waiting for a first response from the main resource.
loadFile(filePath, options?)Promise<void>Loads the given file in the window.
loadURL(url, options?)Promise<void>Loads the url in the window.
on('before-input-event', listener)thisRegisters a listener for the before-input-event event.
on('blur', listener)thisRegisters a listener for the blur event.
on('certificate-error', listener)thisRegisters a listener for the certificate-error event.
on('console-message', listener)thisRegisters a listener for the console-message event.
on('context-menu', listener)thisRegisters a listener for the context-menu event.
on('crashed', listener)thisRegisters a listener for the crashed event.
on('cursor-changed', listener)thisRegisters a listener for the cursor-changed event.
on('destroyed', listener)thisRegisters a listener for the destroyed event.
on('devtools-closed', listener)thisRegisters a listener for the devtools-closed event.
on('devtools-focused', listener)thisRegisters a listener for the devtools-focused event.
on('devtools-opened', listener)thisRegisters a listener for the devtools-opened event.
on('devtools-reload-page', listener)thisRegisters a listener for the devtools-reload-page event.
on('did-attach-webview', listener)thisRegisters a listener for the did-attach-webview event.
on('did-change-theme-color', listener)thisRegisters a listener for the did-change-theme-color event.
on('did-create-window', listener)thisRegisters a listener for the did-create-window event.
on('did-fail-load', listener)thisRegisters a listener for the did-fail-load event.
on('did-fail-provisional-load', listener)thisRegisters a listener for the did-fail-provisional-load event.
on('did-finish-load', listener)thisRegisters a listener for the did-finish-load event.
on('did-frame-finish-load', listener)thisRegisters a listener for the did-frame-finish-load event.
on('did-frame-navigate', listener)thisRegisters a listener for the did-frame-navigate event.
on('did-navigate', listener)thisRegisters a listener for the did-navigate event.
on('did-navigate-in-page', listener)thisRegisters a listener for the did-navigate-in-page event.
on('did-redirect-navigation', listener)thisRegisters a listener for the did-redirect-navigation event.
on('did-start-loading', listener)thisRegisters a listener for the did-start-loading event.
on('did-start-navigation', listener)thisRegisters a listener for the did-start-navigation event.
on('did-stop-loading', listener)thisRegisters a listener for the did-stop-loading event.
on('dom-ready', listener)thisRegisters a listener for the dom-ready event.
on('enter-html-full-screen', listener)thisRegisters a listener for the enter-html-full-screen event.
on('focus', listener)thisRegisters a listener for the focus event.
on('found-in-page', listener)thisRegisters a listener for the found-in-page event.
on('frame-created', listener)thisRegisters a listener for the frame-created event.
on('input-event', listener)thisRegisters a listener for the input-event event.
on('ipc-message', listener)thisRegisters a listener for the ipc-message event.
on('ipc-message-sync', listener)thisRegisters a listener for the ipc-message-sync event.
on('leave-html-full-screen', listener)thisRegisters a listener for the leave-html-full-screen event.
on('login', listener)thisRegisters a listener for the login event.
on('media-paused', listener)thisRegisters a listener for the media-paused event.
on('media-started-playing', listener)thisRegisters a listener for the media-started-playing event.
on('new-window', listener)thisRegisters a listener for the new-window event.
on('page-favicon-updated', listener)thisRegisters a listener for the page-favicon-updated event.
on('page-title-updated', listener)thisRegisters a listener for the page-title-updated event.
on('paint', listener)thisRegisters a listener for the paint event.
on('plugin-crashed', listener)thisRegisters a listener for the plugin-crashed event.
on('preferred-size-changed', listener)thisRegisters a listener for the preferred-size-changed event.
on('preload-error', listener)thisRegisters a listener for the preload-error event.
on('render-process-gone', listener)thisRegisters a listener for the render-process-gone event.
on('responsive', listener)thisRegisters a listener for the responsive event.
on('select-bluetooth-device', listener)thisRegisters a listener for the select-bluetooth-device event.
on('select-client-certificate', listener)thisRegisters a listener for the select-client-certificate event.
on('unresponsive', listener)thisRegisters a listener for the unresponsive event.
on('update-target-url', listener)thisRegisters a listener for the update-target-url event.
on('will-attach-webview', listener)thisRegisters a listener for the will-attach-webview event.
on('will-navigate', listener)thisRegisters a listener for the will-navigate event.
on('will-prevent-unload', listener)thisRegisters a listener for the will-prevent-unload event.
on('will-redirect', listener)thisRegisters a listener for the will-redirect event.
on('zoom-changed', listener)thisRegisters a listener for the zoom-changed event.
once(event, listener)thisRegisters a one-time listener for the before-input-event event.
once(event, listener)thisRegisters a one-time listener for the blur event.
once(event, listener)thisRegisters a one-time listener for the certificate-error event.
once(event, listener)thisRegisters a one-time listener for the console-message event.
once(event, listener)thisRegisters a one-time listener for the context-menu event.
once(event, listener)thisRegisters a one-time listener for the crashed event.
once(event, listener)thisRegisters a one-time listener for the cursor-changed event.
once(event, listener)thisRegisters a one-time listener for the destroyed event.
once(event, listener)thisRegisters a one-time listener for the devtools-closed event.
once(event, listener)thisRegisters a one-time listener for the devtools-focused event.
once(event, listener)thisRegisters a one-time listener for the devtools-opened event.
once(event, listener)thisRegisters a one-time listener for the devtools-reload-page event.
once(event, listener)thisRegisters a one-time listener for the did-attach-webview event.
once(event, listener)thisRegisters a one-time listener for the did-change-theme-color event.
once(event, listener)thisRegisters a one-time listener for the did-create-window event.
once(event, listener)thisRegisters a one-time listener for the did-fail-load event.
once(event, listener)thisRegisters a one-time listener for the did-fail-provisional-load event.
once(event, listener)thisRegisters a one-time listener for the did-finish-load event.
once(event, listener)thisRegisters a one-time listener for the did-frame-finish-load event.
once(event, listener)thisRegisters a one-time listener for the did-frame-navigate event.
once(event, listener)thisRegisters a one-time listener for the did-navigate event.
once(event, listener)thisRegisters a one-time listener for the did-navigate-in-page event.
once(event, listener)thisRegisters a one-time listener for the did-redirect-navigation event.
once(event, listener)thisRegisters a one-time listener for the did-start-loading event.
once(event, listener)thisRegisters a one-time listener for the did-start-navigation event.
once(event, listener)thisRegisters a one-time listener for the did-stop-loading event.
once(event, listener)thisRegisters a one-time listener for the dom-ready event.
once(event, listener)thisRegisters a one-time listener for the enter-html-full-screen event.
once(event, listener)thisRegisters a one-time listener for the focus event.
once(event, listener)thisRegisters a one-time listener for the found-in-page event.
once(event, listener)thisRegisters a one-time listener for the frame-created event.
once(event, listener)thisRegisters a one-time listener for the input-event event.
once(event, listener)thisRegisters a one-time listener for the ipc-message event.
once(event, listener)thisRegisters a one-time listener for the ipc-message-sync event.
once(event, listener)thisRegisters a one-time listener for the leave-html-full-screen event.
once(event, listener)thisRegisters a one-time listener for the login event.
once(event, listener)thisRegisters a one-time listener for the media-paused event.
once(event, listener)thisRegisters a one-time listener for the media-started-playing event.
once(event, listener)thisRegisters a one-time listener for the new-window event.
once(event, listener)thisRegisters a one-time listener for the page-favicon-updated event.
once(event, listener)thisRegisters a one-time listener for the page-title-updated event.
once(event, listener)thisRegisters a one-time listener for the paint event.
once(event, listener)thisRegisters a one-time listener for the plugin-crashed event.
once(event, listener)thisRegisters a one-time listener for the preferred-size-changed event.
once(event, listener)thisRegisters a one-time listener for the preload-error event.
once(event, listener)thisRegisters a one-time listener for the render-process-gone event.
once(event, listener)thisRegisters a one-time listener for the responsive event.
once(event, listener)thisRegisters a one-time listener for the select-bluetooth-device event.
once(event, listener)thisRegisters a one-time listener for the select-client-certificate event.
once(event, listener)thisRegisters a one-time listener for the unresponsive event.
once(event, listener)thisRegisters a one-time listener for the update-target-url event.
once(event, listener)thisRegisters a one-time listener for the will-attach-webview event.
once(event, listener)thisRegisters a one-time listener for the will-navigate event.
once(event, listener)thisRegisters a one-time listener for the will-prevent-unload event.
once(event, listener)thisRegisters a one-time listener for the will-redirect event.
once(event, listener)thisRegisters a one-time listener for the zoom-changed event.
openDevTools(options?)voidOpens the developer tools.
paste()voidExecutes the editing command paste in the web page.
pasteAndMatchStyle()voidExecutes the editing command pasteAndMatchStyle in the web page.
postMessage(channel, message, transfer?)voidSends a message to the renderer process, optionally transferring ownership of message ports.
print(options?, callback?)voidPrints the window's web page.
printToPDF(options)Promise<Buffer>Prints the window's web page as PDF.
redo()voidExecutes the editing command redo in the web page.
reload()voidReloads the current web page.
reloadIgnoringCache()voidReloads the current page and ignores the cache.
removeInsertedCSS(key)Promise<void>Removes the inserted CSS from the current web page identified by its key.
removeListener(event, listener)thisRemoves a previously registered before-input-event event listener.
removeListener(event, listener)thisRemoves a previously registered blur event listener.
removeListener(event, listener)thisRemoves a previously registered certificate-error event listener.
removeListener(event, listener)thisRemoves a previously registered console-message event listener.
removeListener(event, listener)thisRemoves a previously registered context-menu event listener.
removeListener(event, listener)thisRemoves a previously registered crashed event listener.
removeListener(event, listener)thisRemoves a previously registered cursor-changed event listener.
removeListener(event, listener)thisRemoves a previously registered destroyed event listener.
removeListener(event, listener)thisRemoves a previously registered devtools-closed event listener.
removeListener(event, listener)thisRemoves a previously registered devtools-focused event listener.
removeListener(event, listener)thisRemoves a previously registered devtools-opened event listener.
removeListener(event, listener)thisRemoves a previously registered devtools-reload-page event listener.
removeListener(event, listener)thisRemoves a previously registered did-attach-webview event listener.
removeListener(event, listener)thisRemoves a previously registered did-change-theme-color event listener.
removeListener(event, listener)thisRemoves a previously registered did-create-window event listener.
removeListener(event, listener)thisRemoves a previously registered did-fail-load event listener.
removeListener(event, listener)thisRemoves a previously registered did-fail-provisional-load event listener.
removeListener(event, listener)thisRemoves a previously registered did-finish-load event listener.
removeListener(event, listener)thisRemoves a previously registered did-frame-finish-load event listener.
removeListener(event, listener)thisRemoves a previously registered did-frame-navigate event listener.
removeListener(event, listener)thisRemoves a previously registered did-navigate event listener.
removeListener(event, listener)thisRemoves a previously registered did-navigate-in-page event listener.
removeListener(event, listener)thisRemoves a previously registered did-redirect-navigation event listener.
removeListener(event, listener)thisRemoves a previously registered did-start-loading event listener.
removeListener(event, listener)thisRemoves a previously registered did-start-navigation event listener.
removeListener(event, listener)thisRemoves a previously registered did-stop-loading event listener.
removeListener(event, listener)thisRemoves a previously registered dom-ready event listener.
removeListener(event, listener)thisRemoves a previously registered enter-html-full-screen event listener.
removeListener(event, listener)thisRemoves a previously registered focus event listener.
removeListener(event, listener)thisRemoves a previously registered found-in-page event listener.
removeListener(event, listener)thisRemoves a previously registered frame-created event listener.
removeListener(event, listener)thisRemoves a previously registered input-event event listener.
removeListener(event, listener)thisRemoves a previously registered ipc-message event listener.
removeListener(event, listener)thisRemoves a previously registered ipc-message-sync event listener.
removeListener(event, listener)thisRemoves a previously registered leave-html-full-screen event listener.
removeListener(event, listener)thisRemoves a previously registered login event listener.
removeListener(event, listener)thisRemoves a previously registered media-paused event listener.
removeListener(event, listener)thisRemoves a previously registered media-started-playing event listener.
removeListener(event, listener)thisRemoves a previously registered new-window event listener.
removeListener(event, listener)thisRemoves a previously registered page-favicon-updated event listener.
removeListener(event, listener)thisRemoves a previously registered page-title-updated event listener.
removeListener(event, listener)thisRemoves a previously registered paint event listener.
removeListener(event, listener)thisRemoves a previously registered plugin-crashed event listener.
removeListener(event, listener)thisRemoves a previously registered preferred-size-changed event listener.
removeListener(event, listener)thisRemoves a previously registered preload-error event listener.
removeListener(event, listener)thisRemoves a previously registered render-process-gone event listener.
removeListener(event, listener)thisRemoves a previously registered responsive event listener.
removeListener(event, listener)thisRemoves a previously registered select-bluetooth-device event listener.
removeListener(event, listener)thisRemoves a previously registered select-client-certificate event listener.
removeListener(event, listener)thisRemoves a previously registered unresponsive event listener.
removeListener(event, listener)thisRemoves a previously registered update-target-url event listener.
removeListener(event, listener)thisRemoves a previously registered will-attach-webview event listener.
removeListener(event, listener)thisRemoves a previously registered will-navigate event listener.
removeListener(event, listener)thisRemoves a previously registered will-prevent-unload event listener.
removeListener(event, listener)thisRemoves a previously registered will-redirect event listener.
removeListener(event, listener)thisRemoves a previously registered zoom-changed event listener.
removeWorkSpace(path)voidRemoves the specified path from the DevTools workspace.
replace(text)voidExecutes the editing command replace in the web page.
replaceMisspelling(text)voidExecutes the editing command replaceMisspelling in the web page.
savePage(fullPath, saveType)Promise<void>Saves the current web page to the given path.
selectAll()voidExecutes the editing command selectAll in the web page.
send(channel, args?)voidSends an asynchronous message to the renderer process via channel, along with arguments.
sendInputEvent(inputEvent)voidInjects a trusted input event into the page, driving the same input pipeline a real user produces (unlike untrusted dispatchEvent, which CodeMirror and the CSS :hover engine ignore).
sendToFrame(frameId, channel, args?)voidSends an asynchronous message to a specific frame in a renderer process via channel.
setAudioMuted(muted)voidMutes or unmutes the audio on the current web page.
setBackgroundThrottling(allowed)voidControls whether this web contents throttles animations and timers when backgrounded.
setDevToolsWebContents(devToolsWebContents)voidUses the given web contents as the target to show DevTools.
setFrameRate(fps)voidSets the frame rate when offscreen rendering is enabled. Only values between 1 and 240 are accepted.
setIgnoreMenuShortcuts(ignore)voidIgnores application menu shortcuts while this web contents is focused.
setImageAnimationPolicy(policy)voidSets the image animation policy for this web contents.
setUserAgent(userAgent)voidOverrides the user agent for this web page.
setVisualZoomLevelLimits(minimumLevel, maximumLevel)Promise<void>Sets the maximum and minimum pinch-to-zoom level.
setWebRTCIPHandlingPolicy(policy)voidSets the WebRTC IP handling policy.
setWindowOpenHandler(handler)voidSets a handler called before a new window is requested by the renderer.
setZoomFactor(factor)voidChanges the zoom factor to the specified factor.
setZoomLevel(level)voidChanges the zoom level to the specified level.
showDefinitionForSelection()voidShows a pop-up dictionary that searches the selected word on the page. Only available on macOS.
startDrag(item)voidSets the item as the dragging item for the current drag-drop operation.
startPainting()voidStarts painting when offscreen rendering is enabled and not painting.
stop()voidStops any pending navigation.
stopFindInPage(action)voidStops any findInPage request for the web contents with the provided action.
stopPainting()voidStops painting when offscreen rendering is enabled and painting.
takeHeapSnapshot(filePath)Promise<void>Takes a V8 heap snapshot and saves it to filePath.
toggleDevTools()voidToggles the developer tools.
undo()voidExecutes the editing command undo in the web page.
unselect()voidExecutes the editing command unselect in the web page.

Links to this page: