Header menu logo fable-electron-docs-api

WebviewTag Type

⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ❌### WarningElectron's webview tag is based on Chromium's webview, which is undergoing dramatic architectural changes. This impacts the stability of webviews, including rendering, navigation, and event routing. We currently recommend to not use the webview tag and to consider alternatives, like iframe, a WebContentsView, or an architecture that avoids embedded content altogether.### EnablingBy default the webview tag is disabled in Electron >= 5. You need to enable the tag by setting the webviewTag webPreferences option when constructing your BrowserWindow. For more information see the BrowserWindow constructor docs.### Overview> Display external web content in an isolated frame and process.Process: Renderer _This class is not exported from the 'electron' module. It is only available as a return value of other methods in the Electron API._Use the webview tag to embed 'guest' content (such as web pages) in your Electron app. The guest content is contained within the webview container. An embedded page within your app controls how the guest content is laid out and rendered.Unlike an iframe, the webview runs in a separate process than your app. It doesn't have the same permissions as your web page and all interactions between your app and embedded content will be asynchronous. This keeps your app safe from the embedded content.> [!NOTE] Most methods called on the webview from the host page require a synchronous call to the main process.### ExampleTo embed a web page in your app, add the webview tag to your app's embedder page (this is the app page that will display the guest content). In its simplest form, the webview tag includes the src of the web page and css styles that control the appearance of the webview container:If you want to control the guest content in any way, you can write JavaScript that listens for webview events and responds to those events using the webview methods. Here's sample code with two event listeners: one that listens for the web page to start loading, the other for the web page to stop loading, and displays a "loading..." message during the load time:### Internal implementationUnder the hood webview is implemented with Out-of-Process iframes (OOPIFs). The webview tag is essentially a custom element using shadow DOM to wrap an iframe element inside it.So the behavior of webview is very similar to a cross-domain iframe, as examples:* When clicking into a webview, the page focus will move from the embedder frame to webview.* You can not add keyboard, mouse, and scroll event listeners to webview.* All reactions between the embedder frame and webview are asynchronous.### CSS Styling NotesPlease note that the webview tag's style uses display:flex; internally to ensure the child iframe element fills the full height and width of its webview container when used with traditional and flexbox layouts. Please do not overwrite the default display:flex; CSS property, unless specifying display:inline-flex; for inline layout.### Tag AttributesThe webview tag has the following attributes:### srcA string representing the visible URL. Writing to this attribute initiates top-level navigation.Assigning src its own value will reload the current page.The src attribute can also accept data URLs, such as data:text/plain,Hello, world!.### nodeintegrationA boolean. When this attribute is present the guest page in webview will have node integration and can use node APIs like require and process to access low level system resources. Node integration is disabled by default in the guest page.### nodeintegrationinsubframesA boolean for the experimental option for enabling NodeJS support in sub-frames such as iframes inside the webview. All your preloads will load for every iframe, you can use process.isMainFrame to determine if you are in the main frame or not. This option is disabled by default in the guest page.### pluginsA boolean. When this attribute is present the guest page in webview will be able to use browser plugins. Plugins are disabled by default.### preloadA string that specifies a script that will be loaded before other scripts run in the guest page. The protocol of script's URL must be file: (even when using asar: archives) because it will be loaded by Node's require under the hood, which treats asar: archives as virtual directories.When the guest page doesn't have node integration this script will still have access to all Node APIs, but global objects injected by Node will be deleted after this script has finished executing.### httpreferrerA string that sets the referrer URL for the guest page.### useragentA string that sets the user agent for the guest page before the page is navigated to. Once the page is loaded, use the setUserAgent method to change the user agent.### disablewebsecurityA boolean. When this attribute is present the guest page will have web security disabled. Web security is enabled by default.This value can only be modified before the first navigation.### partitionA string that sets the session used by the page. If partition starts with persist:, the page will use a persistent session available to all pages in the app with the same partition. if there is no persist: prefix, the page will use an in-memory session. By assigning the same partition, multiple pages can share the same session. If the partition is unset then default session of the app will be used.This value can only be modified before the first navigation, since the session of an active renderer process cannot change. Subsequent attempts to modify the value will fail with a DOM exception.### allowpopupsA boolean. When this attribute is present the guest page will be allowed to open new windows. Popups are disabled by default.### webpreferencesA string which is a comma separated list of strings which specifies the web preferences to be set on the webview. The full list of supported preference strings can be found in BrowserWindow.The string follows the same format as the features string in window.open. A name by itself is given a true boolean value. A preference can be set to another value by including an =, followed by the value. Special values yes and 1 are interpreted as true, while no and 0 are interpreted as false.### enableblinkfeaturesA string which is a list of strings which specifies the blink features to be enabled separated by ,. The full list of supported feature strings can be found in the RuntimeEnabledFeatures.json5 file.### disableblinkfeaturesA string which is a list of strings which specifies the blink features to be disabled separated by ,. The full list of supported feature strings can be found in the RuntimeEnabledFeatures.json5 file.

Instance members

Instance member Description

this.adjustSelection (?start, ?end)

Full Usage: this.adjustSelection (?start, ?end)

Parameters:
    ?start : float
    ?end : float

Modifiers: inline

Adjusts the current text selection starting and ending points in the focused frame by the given amounts. A negative amount moves the selection towards the beginning of the document, and a positive amount moves the selection towards the end of the document.See webContents.adjustSelection for examples.

?start : float
?end : float

this.allowpopups

Full Usage: this.allowpopups

A boolean. When this attribute is present the guest page will be allowed to open new windows. Popups are disabled by default.

this.canGoBack ()

Full Usage: this.canGoBack ()

Returns: bool
Modifiers: inline

Whether the guest page can go back.

Returns: bool

this.canGoForward ()

Full Usage: this.canGoForward ()

Returns: bool
Modifiers: inline

Whether the guest page can go forward.

Returns: bool

this.canGoToOffset offset

Full Usage: this.canGoToOffset offset

Parameters:
    offset : int

Returns: bool
Modifiers: inline

Whether the guest page can go to offset.

offset : int
Returns: bool

this.capturePage ?rect

Full Usage: this.capturePage ?rect

Parameters:
Returns: Promise<NativeImage>
Modifiers: inline

Resolves with a NativeImageCaptures a snapshot of the page within rect. Omitting rect will capture the whole visible page.

?rect : Rectangle
Returns: Promise<NativeImage>

this.centerSelection ()

Full Usage: this.centerSelection ()

Modifiers: inline

Centers the current text selection in page.

this.clearHistory ()

Full Usage: this.clearHistory ()

Modifiers: inline

Clears the navigation history.

this.closeDevTools ()

Full Usage: this.closeDevTools ()

Modifiers: inline

Closes the DevTools window of guest page.

this.copy ()

Full Usage: this.copy ()

Modifiers: inline

Executes editing command copy in page.

this.cut ()

Full Usage: this.cut ()

Modifiers: inline

Executes editing command cut in page.

this.delete ()

Full Usage: this.delete ()

Modifiers: inline

Executes editing command delete in page.

this.disableblinkfeatures

Full Usage: this.disableblinkfeatures

A string which is a list of strings which specifies the blink features to be disabled separated by ,. The full list of supported feature strings can be found in the RuntimeEnabledFeatures.json5 file.

this.disablewebsecurity

Full Usage: this.disablewebsecurity

A boolean. When this attribute is present the guest page will have web security disabled. Web security is enabled by default.This value can only be modified before the first navigation.

this.downloadURL (url, ?headers)

Full Usage: this.downloadURL (url, ?headers)

Parameters:
    url : string
    ?headers : Record<string, string>

Modifiers: inline

Initiates a download of the resource at url without navigating.

url : string
?headers : Record<string, string>

this.enableblinkfeatures

Full Usage: this.enableblinkfeatures

A string which is a list of strings which specifies the blink features to be enabled separated by ,. The full list of supported feature strings can be found in the RuntimeEnabledFeatures.json5 file.

this.executeJavaScript (code, ?userGesture)

Full Usage: this.executeJavaScript (code, ?userGesture)

Parameters:
    code : string
    ?userGesture : bool

Returns: Promise<obj>
Modifiers: inline

A promise that resolves with the result of the executed code or is rejected if the result of the code is a rejected promise.Evaluates code in page. If userGesture is set, it will create the user gesture context in the page. HTML APIs like requestFullScreen, which require user action, can take advantage of this option for automation.

code : string
?userGesture : bool
Returns: Promise<obj>

this.findInPage (text, ?forward, ?findNext, ?matchCase)

Full Usage: this.findInPage (text, ?forward, ?findNext, ?matchCase)

Parameters:
    text : string
    ?forward : bool
    ?findNext : bool
    ?matchCase : bool

Returns: int
Modifiers: inline

The request id used for the request.Starts a request to find all matches for the text in the web page. The result of the request can be obtained by subscribing to found-in-page event.

text : string
?forward : bool
?findNext : bool
?matchCase : bool
Returns: int

this.getTitle ()

Full Usage: this.getTitle ()

Returns: string
Modifiers: inline

The title of guest page.

Returns: string

this.getURL ()

Full Usage: this.getURL ()

Returns: string
Modifiers: inline

The URL of guest page.

Returns: string

this.getUserAgent ()

Full Usage: this.getUserAgent ()

Returns: string
Modifiers: inline

The user agent for guest page.

Returns: string

this.getWebContentsId ()

Full Usage: this.getWebContentsId ()

Returns: float
Modifiers: inline

The WebContents ID of this webview.

Returns: float

this.getZoomFactor ()

Full Usage: this.getZoomFactor ()

Returns: float
Modifiers: inline

the current zoom factor.

Returns: float

this.getZoomLevel ()

Full Usage: this.getZoomLevel ()

Returns: float
Modifiers: inline

the current zoom level.

Returns: float

this.goBack ()

Full Usage: this.goBack ()

Modifiers: inline

Makes the guest page go back.

this.goForward ()

Full Usage: this.goForward ()

Modifiers: inline

Makes the guest page go forward.

this.goToIndex index

Full Usage: this.goToIndex index

Parameters:
    index : int

Modifiers: inline

Navigates to the specified absolute index.

index : int

this.goToOffset offset

Full Usage: this.goToOffset offset

Parameters:
    offset : int

Modifiers: inline

Navigates to the specified offset from the "current entry".

offset : int

this.httpreferrer

Full Usage: this.httpreferrer

A string that sets the referrer URL for the guest page.

this.insertCSS css

Full Usage: this.insertCSS css

Parameters:
    css : string

Returns: Promise<string>
Modifiers: inline

A promise that resolves with a key for the inserted CSS that can later be used to remove the CSS via .removeInsertedCSS(key).Injects CSS into the current web page and returns a unique key for the inserted stylesheet.

css : string
Returns: Promise<string>

this.insertText text

Full Usage: this.insertText text

Parameters:
    text : string

Returns: Promise<unit>
Modifiers: inline

Inserts text to the focused element.

text : string
Returns: Promise<unit>

this.inspectElement (x, y)

Full Usage: this.inspectElement (x, y)

Parameters:
    x : int
    y : int

Modifiers: inline

Starts inspecting element at position (x, y) of guest page.

x : int
y : int

this.inspectServiceWorker ()

Full Usage: this.inspectServiceWorker ()

Modifiers: inline

Opens the DevTools for the service worker context present in the guest page.

this.inspectSharedWorker ()

Full Usage: this.inspectSharedWorker ()

Modifiers: inline

Opens the DevTools for the shared worker context present in the guest page.

this.isAudioMuted ()

Full Usage: this.isAudioMuted ()

Returns: bool
Modifiers: inline

Whether guest page has been muted.

Returns: bool

this.isCrashed ()

Full Usage: this.isCrashed ()

Returns: bool
Modifiers: inline

Whether the renderer process has crashed.

Returns: bool

this.isCurrentlyAudible ()

Full Usage: this.isCurrentlyAudible ()

Returns: bool
Modifiers: inline

Whether audio is currently playing.

Returns: bool

this.isDevToolsFocused ()

Full Usage: this.isDevToolsFocused ()

Returns: bool
Modifiers: inline

Whether DevTools window of guest page is focused.

Returns: bool

this.isDevToolsOpened ()

Full Usage: this.isDevToolsOpened ()

Returns: bool
Modifiers: inline

Whether guest page has a DevTools window attached.

Returns: bool

this.isLoading ()

Full Usage: this.isLoading ()

Returns: bool
Modifiers: inline

Whether guest page is still loading resources.

Returns: bool

this.isLoadingMainFrame ()

Full Usage: this.isLoadingMainFrame ()

Returns: bool
Modifiers: inline

Whether the main frame (and not just iframes or frames within it) is still loading.

Returns: bool

this.isWaitingForResponse ()

Full Usage: this.isWaitingForResponse ()

Returns: bool
Modifiers: inline

Whether the guest page is waiting for a first-response for the main resource of the page.

Returns: bool

this.loadURL (url, ?httpReferrer, ?userAgent, ?extraHeaders, ?postData, ?baseURLForDataURL)

Full Usage: this.loadURL (url, ?httpReferrer, ?userAgent, ?extraHeaders, ?postData, ?baseURLForDataURL)

Parameters:
Returns: Promise<unit>
Modifiers: inline

The promise will resolve when the page has finished loading (see did-finish-load), and rejects if the page fails to load (see did-fail-load).Loads the url in the webview, the url must contain the protocol prefix, e.g. the http:// or file://.

url : URL
?httpReferrer : U2<string, Referrer>
?userAgent : string
?extraHeaders : string
?postData : U2<UploadRawData, UploadFile>[]
?baseURLForDataURL : string
Returns: Promise<unit>

this.nodeintegration

Full Usage: this.nodeintegration

A boolean. When this attribute is present the guest page in webview will have node integration and can use node APIs like require and process to access low level system resources. Node integration is disabled by default in the guest page.

this.nodeintegrationinsubframes

Full Usage: this.nodeintegrationinsubframes

A boolean for the experimental option for enabling NodeJS support in sub-frames such as iframes inside the webview. All your preloads will load for every iframe, you can use process.isMainFrame to determine if you are in the main frame or not. This option is disabled by default in the guest page.

this.offClose handler

Full Usage: this.offClose handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the guest page attempts to close itself.The following example code navigates the webview to about:blank when the guest attempts to close itself.

handler : unit -> unit

this.offConsoleMessage handler

Full Usage: this.offConsoleMessage handler

Parameters:
Modifiers: inline

Fired when the guest window logs a console message.The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

handler : IOnConsoleMessage -> unit

this.offConsoleMessage handler

Full Usage: this.offConsoleMessage handler

Parameters:
    handler : int -> string -> int -> string -> unit

Modifiers: inline

Fired when the guest window logs a console message.The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

handler : int -> string -> int -> string -> unit

this.offContextMenu handler

Full Usage: this.offContextMenu handler

Parameters:
Modifiers: inline

Emitted when there is a new context menu that needs to be handled.

handler : Params -> unit

this.offDestroyed handler

Full Usage: this.offDestroyed handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the WebContents is destroyed.

handler : unit -> unit

this.offDevtoolsClosed handler

Full Usage: this.offDevtoolsClosed handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is closed.

handler : unit -> unit

this.offDevtoolsFocused handler

Full Usage: this.offDevtoolsFocused handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is focused / opened.

handler : unit -> unit

this.offDevtoolsOpenUrl handler

Full Usage: this.offDevtoolsOpenUrl handler

Parameters:
    handler : string -> unit

Modifiers: inline
handler : string -> unit

this.offDevtoolsOpened handler

Full Usage: this.offDevtoolsOpened handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is opened.

handler : unit -> unit

this.offDevtoolsSearchQuery handler

Full Usage: this.offDevtoolsSearchQuery handler

Parameters:
Modifiers: inline

Emitted when 'Search' is selected for text in its context menu.

handler : IOnDevtoolsSearchQuery -> unit

this.offDevtoolsSearchQuery handler

Full Usage: this.offDevtoolsSearchQuery handler

Parameters:
    handler : Event -> string -> unit

Modifiers: inline

Emitted when 'Search' is selected for text in its context menu.

handler : Event -> string -> unit

this.offDidAttach handler

Full Usage: this.offDidAttach handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when attached to the embedder web contents.

handler : unit -> unit

this.offDidChangeThemeColor handler

Full Usage: this.offDidChangeThemeColor handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a page's theme color changes. This is usually due to encountering a meta tag:

handler : string -> unit

this.offDidFailLoad handler

Full Usage: this.offDidFailLoad handler

Parameters:
Modifiers: inline

This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked.

handler : IOnDidFailLoad -> unit

this.offDidFailLoad handler

Full Usage: this.offDidFailLoad handler

Parameters:
    handler : int -> string -> string -> bool -> unit

Modifiers: inline

This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked.

handler : int -> string -> string -> bool -> unit

this.offDidFinishLoad handler

Full Usage: this.offDidFinishLoad handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the navigation is done, i.e. the spinner of the tab will stop spinning, and the onload event is dispatched.

handler : unit -> unit

this.offDidFrameFinishLoad handler

Full Usage: this.offDidFrameFinishLoad handler

Parameters:
    handler : bool -> unit

Modifiers: inline

Fired when a frame has done navigation.

handler : bool -> unit

this.offDidFrameNavigate handler

Full Usage: this.offDidFrameNavigate handler

Parameters:
Modifiers: inline

Emitted when any frame navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : IOnDidFrameNavigate -> unit

this.offDidFrameNavigate handler

Full Usage: this.offDidFrameNavigate handler

Parameters:
    handler : string -> int -> string -> bool -> int -> int -> unit

Modifiers: inline

Emitted when any frame navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : string -> int -> string -> bool -> int -> int -> unit

this.offDidNavigate handler

Full Usage: this.offDidNavigate handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : string -> unit

this.offDidNavigateInPage handler

Full Usage: this.offDidNavigateInPage handler

Parameters:
Modifiers: inline

Emitted when an in-page navigation happened.When in-page navigation happens, the page URL changes but does not cause navigation outside of the page. Examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered.

handler : IOnDidNavigateInPage -> unit

this.offDidNavigateInPage handler

Full Usage: this.offDidNavigateInPage handler

Parameters:
    handler : bool -> string -> unit

Modifiers: inline

Emitted when an in-page navigation happened.When in-page navigation happens, the page URL changes but does not cause navigation outside of the page. Examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered.

handler : bool -> string -> unit

this.offDidRedirectNavigation handler

Full Usage: this.offDidRedirectNavigation handler

Parameters:
Modifiers: inline

Emitted after a server side redirect occurs during navigation. For example a 302 redirect.

handler : IOnDidRedirectNavigation -> unit

this.offDidRedirectNavigation handler

Full Usage: this.offDidRedirectNavigation handler

Parameters:
    handler : string -> bool -> bool -> int -> int -> unit

Modifiers: inline

Emitted after a server side redirect occurs during navigation. For example a 302 redirect.

handler : string -> bool -> bool -> int -> int -> unit

this.offDidStartLoading handler

Full Usage: this.offDidStartLoading handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Corresponds to the points in time when the spinner of the tab starts spinning.

handler : unit -> unit

this.offDidStartNavigation handler

Full Usage: this.offDidStartNavigation handler

Parameters:
Modifiers: inline

Emitted when any frame (including main) starts navigating. isInPlace will be true for in-page navigations.

handler : IOnDidStartNavigation -> unit

this.offDidStartNavigation handler

Full Usage: this.offDidStartNavigation handler

Parameters:
    handler : string -> bool -> bool -> int -> int -> unit

Modifiers: inline

Emitted when any frame (including main) starts navigating. isInPlace will be true for in-page navigations.

handler : string -> bool -> bool -> int -> int -> unit

this.offDidStopLoading handler

Full Usage: this.offDidStopLoading handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Corresponds to the points in time when the spinner of the tab stops spinning.

handler : unit -> unit

this.offDomReady handler

Full Usage: this.offDomReady handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when document in the given frame is loaded.

handler : unit -> unit

this.offEnterHtmlFullScreen handler

Full Usage: this.offEnterHtmlFullScreen handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when page enters fullscreen triggered by HTML API.

handler : unit -> unit

this.offFoundInPage handler

Full Usage: this.offFoundInPage handler

Parameters:
Modifiers: inline

Fired when a result is available for webview.findInPage request.

handler : Result -> unit

this.offIpcMessage handler

Full Usage: this.offIpcMessage handler

Parameters:
Modifiers: inline

Fired when the guest page has sent an asynchronous message to embedder page.With sendToHost method and ipc-message event you can communicate between guest page and embedder page:

handler : IOnIpcMessage -> unit

this.offIpcMessage handler

Full Usage: this.offIpcMessage handler

Parameters:
    handler : float * float -> string -> obj[] -> unit

Modifiers: inline

Fired when the guest page has sent an asynchronous message to embedder page.With sendToHost method and ipc-message event you can communicate between guest page and embedder page:

handler : float * float -> string -> obj[] -> unit

this.offLeaveHtmlFullScreen handler

Full Usage: this.offLeaveHtmlFullScreen handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when page leaves fullscreen triggered by HTML API.

handler : unit -> unit

this.offLoadCommit handler

Full Usage: this.offLoadCommit handler

Parameters:
Modifiers: inline

Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads.

handler : IOnLoadCommit -> unit

this.offLoadCommit handler

Full Usage: this.offLoadCommit handler

Parameters:
    handler : string -> bool -> unit

Modifiers: inline

Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads.

handler : string -> bool -> unit

this.offMediaPaused handler

Full Usage: this.offMediaPaused handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when media is paused or done playing.

handler : unit -> unit

this.offMediaStartedPlaying handler

Full Usage: this.offMediaStartedPlaying handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when media starts playing.

handler : unit -> unit

this.offPageFaviconUpdated handler

Full Usage: this.offPageFaviconUpdated handler

Parameters:
    handler : string[] -> unit

Modifiers: inline

Fired when page receives favicon urls.

handler : string[] -> unit

this.offPageTitleUpdated handler

Full Usage: this.offPageTitleUpdated handler

Parameters:
Modifiers: inline

Fired when page title is set during navigation. explicitSet is false when title is synthesized from file url.

handler : IOnPageTitleUpdated -> unit

this.offPageTitleUpdated handler

Full Usage: this.offPageTitleUpdated handler

Parameters:
    handler : string -> bool -> unit

Modifiers: inline

Fired when page title is set during navigation. explicitSet is false when title is synthesized from file url.

handler : string -> bool -> unit

this.offRenderProcessGone handler

Full Usage: this.offRenderProcessGone handler

Parameters:
Modifiers: inline

Fired when the renderer process unexpectedly disappears. This is normally because it was crashed or killed.

handler : RenderProcessGoneDetails -> unit

this.offUpdateTargetUrl handler

Full Usage: this.offUpdateTargetUrl handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when mouse moves over a link or the keyboard moves the focus to a link.

handler : string -> unit

this.offWillFrameNavigate handler

Full Usage: this.offWillFrameNavigate handler

Parameters:
Modifiers: inline

Emitted when a user or the page wants to start navigation anywhere in the or any frames embedded within. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : IOnWillFrameNavigate -> unit

this.offWillFrameNavigate handler

Full Usage: this.offWillFrameNavigate handler

Parameters:
    handler : string -> bool -> int -> int -> unit

Modifiers: inline

Emitted when a user or the page wants to start navigation anywhere in the or any frames embedded within. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : string -> bool -> int -> int -> unit

this.offWillNavigate handler

Full Usage: this.offWillNavigate handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a user or the page wants to start navigation. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : string -> unit

this.onClose handler

Full Usage: this.onClose handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the guest page attempts to close itself.The following example code navigates the webview to about:blank when the guest attempts to close itself.

handler : unit -> unit

this.onConsoleMessage handler

Full Usage: this.onConsoleMessage handler

Parameters:
Modifiers: inline

Fired when the guest window logs a console message.The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

handler : IOnConsoleMessage -> unit

this.onConsoleMessage handler

Full Usage: this.onConsoleMessage handler

Parameters:
    handler : int -> string -> int -> string -> unit

Modifiers: inline

Fired when the guest window logs a console message.The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

handler : int -> string -> int -> string -> unit

this.onContextMenu handler

Full Usage: this.onContextMenu handler

Parameters:
Modifiers: inline

Emitted when there is a new context menu that needs to be handled.

handler : Params -> unit

this.onDestroyed handler

Full Usage: this.onDestroyed handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the WebContents is destroyed.

handler : unit -> unit

this.onDevtoolsClosed handler

Full Usage: this.onDevtoolsClosed handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is closed.

handler : unit -> unit

this.onDevtoolsFocused handler

Full Usage: this.onDevtoolsFocused handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is focused / opened.

handler : unit -> unit

this.onDevtoolsOpenUrl handler

Full Usage: this.onDevtoolsOpenUrl handler

Parameters:
    handler : string -> unit

Modifiers: inline
handler : string -> unit

this.onDevtoolsOpened handler

Full Usage: this.onDevtoolsOpened handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is opened.

handler : unit -> unit

this.onDevtoolsSearchQuery handler

Full Usage: this.onDevtoolsSearchQuery handler

Parameters:
Modifiers: inline

Emitted when 'Search' is selected for text in its context menu.

handler : IOnDevtoolsSearchQuery -> unit

this.onDevtoolsSearchQuery handler

Full Usage: this.onDevtoolsSearchQuery handler

Parameters:
    handler : Event -> string -> unit

Modifiers: inline

Emitted when 'Search' is selected for text in its context menu.

handler : Event -> string -> unit

this.onDidAttach handler

Full Usage: this.onDidAttach handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when attached to the embedder web contents.

handler : unit -> unit

this.onDidChangeThemeColor handler

Full Usage: this.onDidChangeThemeColor handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a page's theme color changes. This is usually due to encountering a meta tag:

handler : string -> unit

this.onDidFailLoad handler

Full Usage: this.onDidFailLoad handler

Parameters:
Modifiers: inline

This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked.

handler : IOnDidFailLoad -> unit

this.onDidFailLoad handler

Full Usage: this.onDidFailLoad handler

Parameters:
    handler : int -> string -> string -> bool -> unit

Modifiers: inline

This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked.

handler : int -> string -> string -> bool -> unit

this.onDidFinishLoad handler

Full Usage: this.onDidFinishLoad handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the navigation is done, i.e. the spinner of the tab will stop spinning, and the onload event is dispatched.

handler : unit -> unit

this.onDidFrameFinishLoad handler

Full Usage: this.onDidFrameFinishLoad handler

Parameters:
    handler : bool -> unit

Modifiers: inline

Fired when a frame has done navigation.

handler : bool -> unit

this.onDidFrameNavigate handler

Full Usage: this.onDidFrameNavigate handler

Parameters:
Modifiers: inline

Emitted when any frame navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : IOnDidFrameNavigate -> unit

this.onDidFrameNavigate handler

Full Usage: this.onDidFrameNavigate handler

Parameters:
    handler : string -> int -> string -> bool -> int -> int -> unit

Modifiers: inline

Emitted when any frame navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : string -> int -> string -> bool -> int -> int -> unit

this.onDidNavigate handler

Full Usage: this.onDidNavigate handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : string -> unit

this.onDidNavigateInPage handler

Full Usage: this.onDidNavigateInPage handler

Parameters:
Modifiers: inline

Emitted when an in-page navigation happened.When in-page navigation happens, the page URL changes but does not cause navigation outside of the page. Examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered.

handler : IOnDidNavigateInPage -> unit

this.onDidNavigateInPage handler

Full Usage: this.onDidNavigateInPage handler

Parameters:
    handler : bool -> string -> unit

Modifiers: inline

Emitted when an in-page navigation happened.When in-page navigation happens, the page URL changes but does not cause navigation outside of the page. Examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered.

handler : bool -> string -> unit

this.onDidRedirectNavigation handler

Full Usage: this.onDidRedirectNavigation handler

Parameters:
Modifiers: inline

Emitted after a server side redirect occurs during navigation. For example a 302 redirect.

handler : IOnDidRedirectNavigation -> unit

this.onDidRedirectNavigation handler

Full Usage: this.onDidRedirectNavigation handler

Parameters:
    handler : string -> bool -> bool -> int -> int -> unit

Modifiers: inline

Emitted after a server side redirect occurs during navigation. For example a 302 redirect.

handler : string -> bool -> bool -> int -> int -> unit

this.onDidStartLoading handler

Full Usage: this.onDidStartLoading handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Corresponds to the points in time when the spinner of the tab starts spinning.

handler : unit -> unit

this.onDidStartNavigation handler

Full Usage: this.onDidStartNavigation handler

Parameters:
Modifiers: inline

Emitted when any frame (including main) starts navigating. isInPlace will be true for in-page navigations.

handler : IOnDidStartNavigation -> unit

this.onDidStartNavigation handler

Full Usage: this.onDidStartNavigation handler

Parameters:
    handler : string -> bool -> bool -> int -> int -> unit

Modifiers: inline

Emitted when any frame (including main) starts navigating. isInPlace will be true for in-page navigations.

handler : string -> bool -> bool -> int -> int -> unit

this.onDidStopLoading handler

Full Usage: this.onDidStopLoading handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Corresponds to the points in time when the spinner of the tab stops spinning.

handler : unit -> unit

this.onDomReady handler

Full Usage: this.onDomReady handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when document in the given frame is loaded.

handler : unit -> unit

this.onEnterHtmlFullScreen handler

Full Usage: this.onEnterHtmlFullScreen handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when page enters fullscreen triggered by HTML API.

handler : unit -> unit

this.onFoundInPage handler

Full Usage: this.onFoundInPage handler

Parameters:
Modifiers: inline

Fired when a result is available for webview.findInPage request.

handler : Result -> unit

this.onIpcMessage handler

Full Usage: this.onIpcMessage handler

Parameters:
Modifiers: inline

Fired when the guest page has sent an asynchronous message to embedder page.With sendToHost method and ipc-message event you can communicate between guest page and embedder page:

handler : IOnIpcMessage -> unit

this.onIpcMessage handler

Full Usage: this.onIpcMessage handler

Parameters:
    handler : float * float -> string -> obj[] -> unit

Modifiers: inline

Fired when the guest page has sent an asynchronous message to embedder page.With sendToHost method and ipc-message event you can communicate between guest page and embedder page:

handler : float * float -> string -> obj[] -> unit

this.onLeaveHtmlFullScreen handler

Full Usage: this.onLeaveHtmlFullScreen handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when page leaves fullscreen triggered by HTML API.

handler : unit -> unit

this.onLoadCommit handler

Full Usage: this.onLoadCommit handler

Parameters:
Modifiers: inline

Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads.

handler : IOnLoadCommit -> unit

this.onLoadCommit handler

Full Usage: this.onLoadCommit handler

Parameters:
    handler : string -> bool -> unit

Modifiers: inline

Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads.

handler : string -> bool -> unit

this.onMediaPaused handler

Full Usage: this.onMediaPaused handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when media is paused or done playing.

handler : unit -> unit

this.onMediaStartedPlaying handler

Full Usage: this.onMediaStartedPlaying handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when media starts playing.

handler : unit -> unit

this.onPageFaviconUpdated handler

Full Usage: this.onPageFaviconUpdated handler

Parameters:
    handler : string[] -> unit

Modifiers: inline

Fired when page receives favicon urls.

handler : string[] -> unit

this.onPageTitleUpdated handler

Full Usage: this.onPageTitleUpdated handler

Parameters:
Modifiers: inline

Fired when page title is set during navigation. explicitSet is false when title is synthesized from file url.

handler : IOnPageTitleUpdated -> unit

this.onPageTitleUpdated handler

Full Usage: this.onPageTitleUpdated handler

Parameters:
    handler : string -> bool -> unit

Modifiers: inline

Fired when page title is set during navigation. explicitSet is false when title is synthesized from file url.

handler : string -> bool -> unit

this.onRenderProcessGone handler

Full Usage: this.onRenderProcessGone handler

Parameters:
Modifiers: inline

Fired when the renderer process unexpectedly disappears. This is normally because it was crashed or killed.

handler : RenderProcessGoneDetails -> unit

this.onUpdateTargetUrl handler

Full Usage: this.onUpdateTargetUrl handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when mouse moves over a link or the keyboard moves the focus to a link.

handler : string -> unit

this.onWillFrameNavigate handler

Full Usage: this.onWillFrameNavigate handler

Parameters:
Modifiers: inline

Emitted when a user or the page wants to start navigation anywhere in the or any frames embedded within. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : IOnWillFrameNavigate -> unit

this.onWillFrameNavigate handler

Full Usage: this.onWillFrameNavigate handler

Parameters:
    handler : string -> bool -> int -> int -> unit

Modifiers: inline

Emitted when a user or the page wants to start navigation anywhere in the or any frames embedded within. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : string -> bool -> int -> int -> unit

this.onWillNavigate handler

Full Usage: this.onWillNavigate handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a user or the page wants to start navigation. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : string -> unit

this.onceClose handler

Full Usage: this.onceClose handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the guest page attempts to close itself.The following example code navigates the webview to about:blank when the guest attempts to close itself.

handler : unit -> unit

this.onceConsoleMessage handler

Full Usage: this.onceConsoleMessage handler

Parameters:
Modifiers: inline

Fired when the guest window logs a console message.The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

handler : IOnConsoleMessage -> unit

this.onceConsoleMessage handler

Full Usage: this.onceConsoleMessage handler

Parameters:
    handler : int -> string -> int -> string -> unit

Modifiers: inline

Fired when the guest window logs a console message.The following example code forwards all log messages to the embedder's console without regard for log level or other properties.

handler : int -> string -> int -> string -> unit

this.onceContextMenu handler

Full Usage: this.onceContextMenu handler

Parameters:
Modifiers: inline

Emitted when there is a new context menu that needs to be handled.

handler : Params -> unit

this.onceDestroyed handler

Full Usage: this.onceDestroyed handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the WebContents is destroyed.

handler : unit -> unit

this.onceDevtoolsClosed handler

Full Usage: this.onceDevtoolsClosed handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is closed.

handler : unit -> unit

this.onceDevtoolsFocused handler

Full Usage: this.onceDevtoolsFocused handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is focused / opened.

handler : unit -> unit

this.onceDevtoolsOpenUrl handler

Full Usage: this.onceDevtoolsOpenUrl handler

Parameters:
    handler : string -> unit

Modifiers: inline
handler : string -> unit

this.onceDevtoolsOpened handler

Full Usage: this.onceDevtoolsOpened handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when DevTools is opened.

handler : unit -> unit

this.onceDevtoolsSearchQuery handler

Full Usage: this.onceDevtoolsSearchQuery handler

Parameters:
Modifiers: inline

Emitted when 'Search' is selected for text in its context menu.

handler : IOnDevtoolsSearchQuery -> unit

this.onceDevtoolsSearchQuery handler

Full Usage: this.onceDevtoolsSearchQuery handler

Parameters:
    handler : Event -> string -> unit

Modifiers: inline

Emitted when 'Search' is selected for text in its context menu.

handler : Event -> string -> unit

this.onceDidAttach handler

Full Usage: this.onceDidAttach handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when attached to the embedder web contents.

handler : unit -> unit

this.onceDidChangeThemeColor handler

Full Usage: this.onceDidChangeThemeColor handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a page's theme color changes. This is usually due to encountering a meta tag:

handler : string -> unit

this.onceDidFailLoad handler

Full Usage: this.onceDidFailLoad handler

Parameters:
Modifiers: inline

This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked.

handler : IOnDidFailLoad -> unit

this.onceDidFailLoad handler

Full Usage: this.onceDidFailLoad handler

Parameters:
    handler : int -> string -> string -> bool -> unit

Modifiers: inline

This event is like did-finish-load, but fired when the load failed or was cancelled, e.g. window.stop() is invoked.

handler : int -> string -> string -> bool -> unit

this.onceDidFinishLoad handler

Full Usage: this.onceDidFinishLoad handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when the navigation is done, i.e. the spinner of the tab will stop spinning, and the onload event is dispatched.

handler : unit -> unit

this.onceDidFrameFinishLoad handler

Full Usage: this.onceDidFrameFinishLoad handler

Parameters:
    handler : bool -> unit

Modifiers: inline

Fired when a frame has done navigation.

handler : bool -> unit

this.onceDidFrameNavigate handler

Full Usage: this.onceDidFrameNavigate handler

Parameters:
Modifiers: inline

Emitted when any frame navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : IOnDidFrameNavigate -> unit

this.onceDidFrameNavigate handler

Full Usage: this.onceDidFrameNavigate handler

Parameters:
    handler : string -> int -> string -> bool -> int -> int -> unit

Modifiers: inline

Emitted when any frame navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : string -> int -> string -> bool -> int -> int -> unit

this.onceDidNavigate handler

Full Usage: this.onceDidNavigate handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a navigation is done.This event is not emitted for in-page navigations, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.

handler : string -> unit

this.onceDidNavigateInPage handler

Full Usage: this.onceDidNavigateInPage handler

Parameters:
Modifiers: inline

Emitted when an in-page navigation happened.When in-page navigation happens, the page URL changes but does not cause navigation outside of the page. Examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered.

handler : IOnDidNavigateInPage -> unit

this.onceDidNavigateInPage handler

Full Usage: this.onceDidNavigateInPage handler

Parameters:
    handler : bool -> string -> unit

Modifiers: inline

Emitted when an in-page navigation happened.When in-page navigation happens, the page URL changes but does not cause navigation outside of the page. Examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered.

handler : bool -> string -> unit

this.onceDidRedirectNavigation handler

Full Usage: this.onceDidRedirectNavigation handler

Parameters:
Modifiers: inline

Emitted after a server side redirect occurs during navigation. For example a 302 redirect.

handler : IOnDidRedirectNavigation -> unit

this.onceDidRedirectNavigation handler

Full Usage: this.onceDidRedirectNavigation handler

Parameters:
    handler : string -> bool -> bool -> int -> int -> unit

Modifiers: inline

Emitted after a server side redirect occurs during navigation. For example a 302 redirect.

handler : string -> bool -> bool -> int -> int -> unit

this.onceDidStartLoading handler

Full Usage: this.onceDidStartLoading handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Corresponds to the points in time when the spinner of the tab starts spinning.

handler : unit -> unit

this.onceDidStartNavigation handler

Full Usage: this.onceDidStartNavigation handler

Parameters:
Modifiers: inline

Emitted when any frame (including main) starts navigating. isInPlace will be true for in-page navigations.

handler : IOnDidStartNavigation -> unit

this.onceDidStartNavigation handler

Full Usage: this.onceDidStartNavigation handler

Parameters:
    handler : string -> bool -> bool -> int -> int -> unit

Modifiers: inline

Emitted when any frame (including main) starts navigating. isInPlace will be true for in-page navigations.

handler : string -> bool -> bool -> int -> int -> unit

this.onceDidStopLoading handler

Full Usage: this.onceDidStopLoading handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Corresponds to the points in time when the spinner of the tab stops spinning.

handler : unit -> unit

this.onceDomReady handler

Full Usage: this.onceDomReady handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when document in the given frame is loaded.

handler : unit -> unit

this.onceEnterHtmlFullScreen handler

Full Usage: this.onceEnterHtmlFullScreen handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when page enters fullscreen triggered by HTML API.

handler : unit -> unit

this.onceFoundInPage handler

Full Usage: this.onceFoundInPage handler

Parameters:
Modifiers: inline

Fired when a result is available for webview.findInPage request.

handler : Result -> unit

this.onceIpcMessage handler

Full Usage: this.onceIpcMessage handler

Parameters:
Modifiers: inline

Fired when the guest page has sent an asynchronous message to embedder page.With sendToHost method and ipc-message event you can communicate between guest page and embedder page:

handler : IOnIpcMessage -> unit

this.onceIpcMessage handler

Full Usage: this.onceIpcMessage handler

Parameters:
    handler : float * float -> string -> obj[] -> unit

Modifiers: inline

Fired when the guest page has sent an asynchronous message to embedder page.With sendToHost method and ipc-message event you can communicate between guest page and embedder page:

handler : float * float -> string -> obj[] -> unit

this.onceLeaveHtmlFullScreen handler

Full Usage: this.onceLeaveHtmlFullScreen handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Fired when page leaves fullscreen triggered by HTML API.

handler : unit -> unit

this.onceLoadCommit handler

Full Usage: this.onceLoadCommit handler

Parameters:
Modifiers: inline

Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads.

handler : IOnLoadCommit -> unit

this.onceLoadCommit handler

Full Usage: this.onceLoadCommit handler

Parameters:
    handler : string -> bool -> unit

Modifiers: inline

Fired when a load has committed. This includes navigation within the current document as well as subframe document-level loads, but does not include asynchronous resource loads.

handler : string -> bool -> unit

this.onceMediaPaused handler

Full Usage: this.onceMediaPaused handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when media is paused or done playing.

handler : unit -> unit

this.onceMediaStartedPlaying handler

Full Usage: this.onceMediaStartedPlaying handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted when media starts playing.

handler : unit -> unit

this.oncePageFaviconUpdated handler

Full Usage: this.oncePageFaviconUpdated handler

Parameters:
    handler : string[] -> unit

Modifiers: inline

Fired when page receives favicon urls.

handler : string[] -> unit

this.oncePageTitleUpdated handler

Full Usage: this.oncePageTitleUpdated handler

Parameters:
Modifiers: inline

Fired when page title is set during navigation. explicitSet is false when title is synthesized from file url.

handler : IOnPageTitleUpdated -> unit

this.oncePageTitleUpdated handler

Full Usage: this.oncePageTitleUpdated handler

Parameters:
    handler : string -> bool -> unit

Modifiers: inline

Fired when page title is set during navigation. explicitSet is false when title is synthesized from file url.

handler : string -> bool -> unit

this.onceRenderProcessGone handler

Full Usage: this.onceRenderProcessGone handler

Parameters:
Modifiers: inline

Fired when the renderer process unexpectedly disappears. This is normally because it was crashed or killed.

handler : RenderProcessGoneDetails -> unit

this.onceUpdateTargetUrl handler

Full Usage: this.onceUpdateTargetUrl handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when mouse moves over a link or the keyboard moves the focus to a link.

handler : string -> unit

this.onceWillFrameNavigate handler

Full Usage: this.onceWillFrameNavigate handler

Parameters:
Modifiers: inline

Emitted when a user or the page wants to start navigation anywhere in the or any frames embedded within. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : IOnWillFrameNavigate -> unit

this.onceWillFrameNavigate handler

Full Usage: this.onceWillFrameNavigate handler

Parameters:
    handler : string -> bool -> int -> int -> unit

Modifiers: inline

Emitted when a user or the page wants to start navigation anywhere in the or any frames embedded within. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : string -> bool -> int -> int -> unit

this.onceWillNavigate handler

Full Usage: this.onceWillNavigate handler

Parameters:
    handler : string -> unit

Modifiers: inline

Emitted when a user or the page wants to start navigation. It can happen when the window.location object is changed or a user clicks a link in the page.This event will not emit when the navigation is started programmatically with APIs like .loadURL and .back.It is also not emitted during in-page navigation, such as clicking anchor links or updating the window.location.hash. Use did-navigate-in-page event for this purpose.Calling event.preventDefault() does NOT have any effect.

handler : string -> unit

this.openDevTools ()

Full Usage: this.openDevTools ()

Modifiers: inline

Opens a DevTools window for guest page.

this.partition

Full Usage: this.partition

A string that sets the session used by the page. If partition starts with persist:, the page will use a persistent session available to all pages in the app with the same partition. if there is no persist: prefix, the page will use an in-memory session. By assigning the same partition, multiple pages can share the same session. If the partition is unset then default session of the app will be used.This value can only be modified before the first navigation, since the session of an active renderer process cannot change. Subsequent attempts to modify the value will fail with a DOM exception.

this.paste ()

Full Usage: this.paste ()

Modifiers: inline

Executes editing command paste in page.

this.pasteAndMatchStyle ()

Full Usage: this.pasteAndMatchStyle ()

Modifiers: inline

Executes editing command pasteAndMatchStyle in page.

this.plugins

Full Usage: this.plugins

A boolean. When this attribute is present the guest page in webview will be able to use browser plugins. Plugins are disabled by default.

this.preload

Full Usage: this.preload

A string that specifies a script that will be loaded before other scripts run in the guest page. The protocol of script's URL must be file: (even when using asar: archives) because it will be loaded by Node's require under the hood, which treats asar: archives as virtual directories.When the guest page doesn't have node integration this script will still have access to all Node APIs, but global objects injected by Node will be deleted after this script has finished executing.

this.print (?silent, ?printBackground, ?deviceName, ?color, ?margins, ?landscape, ?scaleFactor, ?pagesPerSheet, ?collate, ?copies, ?pageRanges, ?duplexMode, ?dpi, ?header, ?footer, ?pageSize)

Full Usage: this.print (?silent, ?printBackground, ?deviceName, ?color, ?margins, ?landscape, ?scaleFactor, ?pagesPerSheet, ?collate, ?copies, ?pageRanges, ?duplexMode, ?dpi, ?header, ?footer, ?pageSize)

Parameters:
    ?silent : bool
    ?printBackground : bool
    ?deviceName : string
    ?color : bool
    ?margins : Margins
    ?landscape : bool
    ?scaleFactor : float
    ?pagesPerSheet : float
    ?collate : bool
    ?copies : float
    ?pageRanges : PageRanges[]
    ?duplexMode : DuplexMode
    ?dpi : Record<string, float>
    ?header : string
    ?footer : string
    ?pageSize : U2<PageSize, Size>

Returns: Promise<unit>
Modifiers: inline

Prints webview's web page. Same as webContents.print([options]).

?silent : bool
?printBackground : bool
?deviceName : string
?color : bool
?margins : Margins
?landscape : bool
?scaleFactor : float
?pagesPerSheet : float
?collate : bool
?copies : float
?pageRanges : PageRanges[]
?duplexMode : DuplexMode
?dpi : Record<string, float>
?header : string
?footer : string
?pageSize : U2<PageSize, Size>
Returns: Promise<unit>

this.printToPDF (?landscape, ?displayHeaderFooter, ?printBackground, ?scale, ?pageSize, ?margins, ?pageRanges, ?headerTemplate, ?footerTemplate, ?preferCSSPageSize, ?generateTaggedPDF, ?generateDocumentOutline)

Full Usage: this.printToPDF (?landscape, ?displayHeaderFooter, ?printBackground, ?scale, ?pageSize, ?margins, ?pageRanges, ?headerTemplate, ?footerTemplate, ?preferCSSPageSize, ?generateTaggedPDF, ?generateDocumentOutline)

Parameters:
    ?landscape : bool
    ?displayHeaderFooter : bool
    ?printBackground : bool
    ?scale : float
    ?pageSize : U2<PageSize, Size>
    ?margins : Margins
    ?pageRanges : string
    ?headerTemplate : string
    ?footerTemplate : string
    ?preferCSSPageSize : bool
    ?generateTaggedPDF : bool
    ?generateDocumentOutline : bool

Returns: Promise<Uint8Array>
Modifiers: inline

Resolves with the generated PDF data.Prints webview's web page as PDF, Same as webContents.printToPDF(options).

?landscape : bool
?displayHeaderFooter : bool
?printBackground : bool
?scale : float
?pageSize : U2<PageSize, Size>
?margins : Margins
?pageRanges : string
?headerTemplate : string
?footerTemplate : string
?preferCSSPageSize : bool
?generateTaggedPDF : bool
?generateDocumentOutline : bool
Returns: Promise<Uint8Array>

this.redo ()

Full Usage: this.redo ()

Modifiers: inline

Executes editing command redo in page.

this.reload ()

Full Usage: this.reload ()

Modifiers: inline

Reloads the guest page.

this.reloadIgnoringCache ()

Full Usage: this.reloadIgnoringCache ()

Modifiers: inline

Reloads the guest page and ignores cache.

this.removeInsertedCSS key

Full Usage: this.removeInsertedCSS key

Parameters:
    key : string

Returns: Promise<unit>
Modifiers: inline

Resolves if the removal was successful.Removes the inserted CSS from the current web page. The stylesheet is identified by its key, which is returned from .insertCSS(css).

key : string
Returns: Promise<unit>

this.replace text

Full Usage: this.replace text

Parameters:
    text : string

Modifiers: inline

Executes editing command replace in page.

text : string

this.replaceMisspelling text

Full Usage: this.replaceMisspelling text

Parameters:
    text : string

Modifiers: inline

Executes editing command replaceMisspelling in page.

text : string

this.scrollToBottom ()

Full Usage: this.scrollToBottom ()

Modifiers: inline

Scrolls to the bottom of the current .

this.scrollToTop ()

Full Usage: this.scrollToTop ()

Modifiers: inline

Scrolls to the top of the current .

this.selectAll ()

Full Usage: this.selectAll ()

Modifiers: inline

Executes editing command selectAll in page.

this.send (channel, ...args)

Full Usage: this.send (channel, ...args)

Parameters:
    channel : string
    ...args : obj[]

Returns: Promise<unit>
Modifiers: inline

Send an asynchronous message to renderer process via channel, you can also send arbitrary arguments. The renderer process can handle the message by listening to the channel event with the ipcRenderer module.See webContents.send for examples.

channel : string
...args : obj[]
Returns: Promise<unit>

this.sendInputEvent event

Full Usage: this.sendInputEvent event

Parameters:
Returns: Promise<unit>
Modifiers: inline

Sends an input event to the page.See webContents.sendInputEvent for detailed description of event object.

event : U3<MouseInputEvent, MouseWheelInputEvent, KeyboardInputEvent>
Returns: Promise<unit>

this.sendToFrame (frameId, channel, ...args)

Full Usage: this.sendToFrame (frameId, channel, ...args)

Parameters:
    frameId : float * float
    channel : string
    ...args : obj[]

Returns: Promise<unit>
Modifiers: inline

Send an asynchronous message to renderer process via channel, you can also send arbitrary arguments. The renderer process can handle the message by listening to the channel event with the ipcRenderer module.See webContents.sendToFrame for examples.

frameId : float * float
channel : string
...args : obj[]
Returns: Promise<unit>

this.setAudioMuted muted

Full Usage: this.setAudioMuted muted

Parameters:
    muted : bool

Modifiers: inline

Set guest page muted.

muted : bool

this.setUserAgent userAgent

Full Usage: this.setUserAgent userAgent

Parameters:
    userAgent : string

Modifiers: inline

Overrides the user agent for the guest page.

userAgent : string

this.setVisualZoomLevelLimits (minimumLevel, maximumLevel)

Full Usage: this.setVisualZoomLevelLimits (minimumLevel, maximumLevel)

Parameters:
    minimumLevel : float
    maximumLevel : float

Returns: Promise<unit>
Modifiers: inline

Sets the maximum and minimum pinch-to-zoom level.

minimumLevel : float
maximumLevel : float
Returns: Promise<unit>

this.setZoomFactor factor

Full Usage: this.setZoomFactor factor

Parameters:
    factor : float

Modifiers: inline

Changes the zoom factor to the specified factor. Zoom factor is zoom percent divided by 100, so 300% = 3.0.

factor : float

this.setZoomLevel level

Full Usage: this.setZoomLevel level

Parameters:
    level : float

Modifiers: inline

Changes the zoom level to the specified level. The original size is 0 and each increment above or below represents zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively. The formula for this is scale := 1.2 ^ level.> [!NOTE] The zoom policy at the Chromium level is same-origin, meaning that the zoom level for a specific domain propagates across all instances of windows with the same domain. Differentiating the window URLs will make zoom work per-window.

level : float

this.showDefinitionForSelection ()

Full Usage: this.showDefinitionForSelection ()

Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Shows pop-up dictionary that searches the selected word on the page.

this.src

Full Usage: this.src

A string representing the visible URL. Writing to this attribute initiates top-level navigation.Assigning src its own value will reload the current page.The src attribute can also accept data URLs, such as data:text/plain,Hello, world!.

this.stop ()

Full Usage: this.stop ()

Modifiers: inline

Stops any pending navigation.

this.stopFindInPage action

Full Usage: this.stopFindInPage action

Parameters:
Modifiers: inline

Stops any findInPage request for the webview with the provided action.

action : Action

this.undo ()

Full Usage: this.undo ()

Modifiers: inline

Executes editing command undo in page.

this.unselect ()

Full Usage: this.unselect ()

Modifiers: inline

Executes editing command unselect in page.

this.useragent

Full Usage: this.useragent

A string that sets the user agent for the guest page before the page is navigated to. Once the page is loaded, use the setUserAgent method to change the user agent.

this.webpreferences

Full Usage: this.webpreferences

A string which is a comma separated list of strings which specifies the web preferences to be set on the webview. The full list of supported preference strings can be found in BrowserWindow.The string follows the same format as the features string in window.open. A name by itself is given a true boolean value. A preference can be set to another value by including an =, followed by the value. Special values yes and 1 are interpreted as true, while no and 0 are interpreted as false.

Type something to start searching.