The engine for the WebBrowser control is changed from Chromium Embedded Framework (CEF) to Microsoft Edge WebView2.
If the WebBrowser control is used in your application, be aware of the following changes.
-
Changes to the existing functions
The global functions WebBrowserSet and WebBrowserGet have been adjusted accordingly to work with WebView2.
-
New functions
-
NavigateToString function -- Navigates to and loads a page from the specified HTML source code.
-
PostJsonWebMessage and PostStringWebMessage functions -- Sends web messages in JSON or simple string asynchronously.
-
OpenDefaultDownloadDialog and CloseDefaultDownloadDialog functions -- Opens and closes the default download dialog.
-
-
Changes to existing events
The following events have additional arguments: AddressChange, DownloadingStateChanged, DownloadingStart, EvaluateJavascriptFinished, NavigationStart, PdfPrintFinished.
-
New events
-
AcceleratorKeyPressed event -- Supports responding to the keyboard actions (such as F5).
-
Other new events including ContentLoading, DOMContentLoaded, DownloadingOperationStateChanged, EstimatedEndTimeChanged, HistoryChanged, IsDefaultDownloadDialogStateChanged, LoseFocus, NavigationCompleted, WebMessageReceived.
-
-
Changes to runtime files
WebView2 Runtime supports two versions: Evergreen Runtime and Fixed Version. For which WebView2 Runtime version to use, please refer to the section called “Choosing a WebView2 runtime version” in Users Guide.
-
If Evergreen Runtime is used, pbwebbrowser.dll and webbrowserapi.tlb are required.
-
If Fixed Version is used, pbwebbrowser.dll, webbrowserapi.tlb, and all of the files in the "PBWebView2" folder are required.
-
The Example Graph App included in the product contains examples that load graphs in the WebBrowser. If you are interested, please run the application, and then view various graphs.
For the latest documentation, please refer to the section called “Working with WebBrowser” in Users Guide and the section called “WebBrowser control” in Objects and Controls.