Class CoreWebView2Settings() Foundation

A class for manipulating the internal settings of a XbpHTMLViewer2 object.

Description

Instances of the CoreWebView2Settings class are used to expose various WebView2-specific settings via their member variables. Applications can change these settings by first specifying the desired values in a CoreWebView2Settings object, and then passing the settings object to the method XbpHTMLViewer2:setSettings(). The changes will take effect in the internal WebView2 component the next time a navigation is initiated using XbpHTMLViewer2():navigate(). An arbitrary number of settings objects can be created for parameterizing individual navigation requests. The CoreWebView2Settings class itself handles validation but contains no additional logic.

The member variables of a CoreWebView2Settings object correspond to the native WebView2 options defined in the ICoreWebView2Settings and its derived COM interfaces. More information about the available WebView2 options and their respective values can be found here: https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2settings?view=webview2-1.0.3179.45.

Note that the options are distributed over several COM interfaces (ICoreWebView2Settings, ICoreWebView2Settings2 etc.). The CoreWebView2Settings class allows changing all options which use scalar values via a single interface and currently supports the ICoreWebView2Settings interfaces 1..9.

Runtime Data
:AreBrowserAcceleratorKeysEnabled
Controls whether browser accelerator keys are enabled.
:AreDefaultContextMenusEnabled
Controls whether default context menus are enabled.
:AreDevToolsEnabled
Controls whether developer tools can be opened.
:HiddenPdfToolbarItems
Specifies which PDF toolbar items should be hidden.
:IsBuiltInErrorPageEnabled
Controls whether built-in error pages are displayed.
:IsGeneralAutofillEnabled
Controls whether general autofill is enabled.
:IsNonClientRegionSupportEnabled
Controls whether non-client region support is enabled.
:IsPasswordAutosaveEnabled
Controls whether password autosave is enabled.
:IsPinchZoomEnabled
Controls whether pinch zoom gesture is enabled.
:IsReputationCheckingRequired
Controls whether SmartScreen reputation checking is enabled.
:IsScriptEnabled
Controls whether JavaScript execution is enabled.
:IsStatusBarEnabled
Controls whether the status bar is displayed.
:IsSwipeNavigationEnabled
Controls whether swipe navigation gesture is enabled.
:IsWebMessageEnabled
Controls whether web messaging is enabled.
:IsZoomControlEnabled
Controls whether zoom controls are enabled.
:UserAgent
Gets or sets the user agent string.
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.