WebView2Gtk – webview2gtk Reference Manual
Packages
webview2gtk
WebView2Gtk
AutoplayPolicy
CookieAcceptPolicy
CookiePersistentStorage
HardwareAccelerationPolicy
LoadEvent
NavigatorWebDriverActivePolicy
NetworkProxyMode
PermissionState
PolicyDecisionType
ScriptDialogType
SnapshotOptions
SnapshotRegion
TLSErrorsPolicy
PermissionRequest
ApplicationInfo
AutomationSession
CookieManager
Download
JavaScriptResult
NetworkProxySettings
NetworkSession
PermissionStateQuery
PolicyDecision
PrintOperation
ResponsePolicyDecision
ScriptDialog
URIRequest
URIResponse
UserContentManager
WebContext
WebInspector
WebResource
WebView
WebViewSettings
WebsitePolicies
get_navigator_webdriver_active_policy
set_navigator_webdriver_active_policy
WebView2Gtk
Description:
Content:
Interfaces:
PermissionRequest
-
WebKitGTK-shaped — allow/deny a permission prompt.
Classes:
ApplicationInfo
-
WebKitGTK-shaped application info for an
AutomationSession
.
AutomationSession
-
WebKitGTK-shaped automation session(browser side).
CookieManager
Download
-
WebKitGTK-shaped download — hold until
set_destination
/
cancel
.
JavaScriptResult
NetworkProxySettings
NetworkSession
-
WebKitGTK-shaped network session — cookies + download_started.
PermissionStateQuery
-
WebKitGTK- shaped — answer a permission-state query (API parity; host may never emit).
PolicyDecision
-
WebKitGTK-shaped pending policy decision.
PrintOperation
ResponsePolicyDecision
-
WebKitGTK- shaped response policy decision for main-frame document loads.
ScriptDialog
-
WebKitGTK-shaped — one page
alert
,
confirm
,
prompt
, or before-unload.
URIRequest
-
Minimal WebKit URIRequest stand- in(uri only — enough for OLLMchat).
URIResponse
-
WebKitGTK-shaped URI response metadata.
UserContentManager
-
WebKitGTK-shaped user content manager — script message handlers for 2.0.
WebContext
-
WebKitGTK-shaped web context — automation allow + session signal.
WebInspector
-
WebKitGTK-shaped inspector —
show
opens the host DevTools window.
WebResource
-
WebKitGTK-shaped web resource — in-flight subresource for load tracking.
WebView
-
Embeds WebView2 in a GTK 4 window using the toplevel Win32 HWND from `gdk_win32_surface_get_handle()` on the native surface.
WebViewSettings
WebsitePolicies
-
WebKitGTK-shaped website policies for a
WebView
.
Enums:
AutoplayPolicy
-
WebKitGTK-shaped — media autoplay policy for
WebsitePolicies
.
CookieAcceptPolicy
CookiePersistentStorage
HardwareAccelerationPolicy
LoadEvent
-
Load lifecycle events — same names and order as WebKit.LoadEvent.
NavigatorWebDriverActivePolicy
-
WebKitGTK-shaped — whether page JS sees navigator.webdriver as active. On Windows,
NavigatorWebDriverActivePolicy.DISABLED
maps to Chromium `--disable-blink-features=AutomationControlled` at environment create.
NetworkProxyMode
PermissionState
-
WebKitGTK-shaped — result of
PermissionStateQuery.finish
.
PolicyDecisionType
-
WebKitGTK-shaped — type of
WebView.decide_policy
decision.
ScriptDialogType
-
WebKitGTK-shaped — kind of
WebView.script_dialog
.
SnapshotOptions
SnapshotRegion
TLSErrorsPolicy
Error domains:
NetworkError
-
WebKitGTK-shaped subset — used by
WebView.load_failed
.
Functions:
public
NavigatorWebDriverActivePolicy
get_navigator_webdriver_active_policy
(
WebViewSettings
settings)
WebKitGTK-shaped free function twin of Settings.get_navigator_webdriver_active_policy.
public
void
set_navigator_webdriver_active_policy
(
WebViewSettings
settings,
NavigatorWebDriverActivePolicy
policy)
WebKitGTK-shaped free function twin of Settings.set_navigator_webdriver_active_policy.