WebviewOptions

external interface WebviewOptions(source)

Configuration for the webview to create.

Since

2.0.0

Properties

Link copied to clipboard
abstract var acceptFirstMouse: Boolean?

Whether clicking an inactive webview also clicks through to the webview on macOS.

Link copied to clipboard
abstract var allowLinkPreview: Boolean?

on macOS and iOS there is a link preview on long pressing links, this is enabled by default. see https://docs.rs/objc2-web-kit/latest/objc2_web_kit/struct.WKWebView.html#method.allowsLinkPreview

Link copied to clipboard
abstract var backgroundColor: Color?

Set the window and webview background color.

Link copied to clipboard

Change the default background throttling behaviour.

Link copied to clipboard
abstract var dataDirectory: String?

Set a custom path for the webview's data directory (localStorage, cache, etc.) relative to `appDataDir()`/${label}. For security reasons, paths outside of that location can only be configured on the Rust side.

Link copied to clipboard
abstract var dataStoreIdentifier: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/Double>??

Initialize the WebView with a custom data store identifier. This can be seen as a replacement for dataDirectory which is unavailable in WKWebView. See https://developer.apple.com/documentation/webkit/wkwebsitedatastore/init(foridentifier:)?language=objc

Link copied to clipboard
abstract var devtools: Boolean?

Whether web inspector, which is usually called browser devtools, is enabled or not. Enabled by default.

Link copied to clipboard

Allows disabling the input accessory view on iOS.

Link copied to clipboard
abstract var dragDropEnabled: Boolean?

Whether the drag and drop is enabled or not on the webview. By default it is enabled.

Link copied to clipboard
abstract var focus: Boolean?

Whether the webview should have focus or not

Link copied to clipboard
abstract var height: Double

The initial height.

Link copied to clipboard
abstract var incognito: Boolean?

Whether or not the webview should be launched in incognito mode.

Link copied to clipboard

Whether we should disable JavaScript code execution on the webview or not.

Link copied to clipboard
abstract var proxyUrl: String?

The proxy URL for the WebView for all network requests.

Link copied to clipboard

Specifies the native scrollbar style to use with the webview. CSS styles that modify the scrollbar are applied on top of the native appearance configured here.

Link copied to clipboard
abstract var transparent: Boolean?

Whether the webview is transparent or not. Note that on macOS this requires the macos-private-api feature flag, enabled under tauri.conf.json > app > macOSPrivateApi. WARNING: Using private APIs on macOS prevents your application from being accepted to the App Store.

Link copied to clipboard
abstract var url: String?

Remote URL or local file path to open.

Link copied to clipboard
abstract var useHttpsScheme: Boolean?

Sets whether the custom protocols should use https://<scheme>.localhost instead of the default http://<scheme>.localhost on Windows and Android. Defaults to false.

Link copied to clipboard
abstract var userAgent: String?

The user agent for the webview.

Link copied to clipboard
abstract var width: Double

The initial width.

Link copied to clipboard
abstract var x: Double

The initial vertical position.

Link copied to clipboard
abstract var y: Double

The initial horizontal position.

Link copied to clipboard

Whether page zooming by hotkeys is enabled