AdditionalBrowserArguments
Interface AntView and AntViewGlobal
Type: Property
Access: Read/Write
Data Type: String
Add browser arguments (chrome flags) that are used by the WebView2 control during initialisation.
This allows you to change behavior on the WebView2 control.
You can set the arguments via either the global interface (AntViewGlobal) or for the current AntView control.
It has to be set before you create your webview2 control.
For example, you want to disable GPU hardware acceleration because your virtualisation platform doesn't support it.
In that case you can pass the "--disable-gpu" flag to instruct WebView2 to disable this features:
(Code example in DataFlex)
Set ComCreateWebViewOnCreate of hoAntViewGlobal to True
Set ComAdditionalBrowserArguments of hoAntViewGlobal to "--disable-gpu"
The way to check that the setting has been set, is a bit tricky as WebView2 has no settings panel like MS Edge does.
A chrome flag is passed on the command line and you can see it for example with process explorer from Sysinternals.
My App is called "Demo.exe" and the outer msedgewebview2.exe process has the setting.
In the Microsoft .Net interface this is called the CoreWebView2EnvironmentOptions.AdditionalBrowserArguments property.
Introduced in AntView release 1.1.164
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024