WebBrowser engine upgrade
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 the existing events
The following events have been added with new 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.
-
-
New distribution modes
WebView2 Runtime supports two distribution modes: Evergreen
Runtime and Fixed Version. For more information about WebView2
distribution modes, please refer to the section called “Working with WebBrowser” in Users Guide. -
Changes to runtime files
The following runtime files/folder have been changed or
added for WebView2 Runtime: pbwebbrowser.dll (changed), webbrowserapi.tlb (newly added), and all
the files in the “PBWebView2”
folder (newly added).For Evergreen Runtime, pbwebbrowser.dll and
webbrowserapi.tlb are required; for Fixed Version,
pbwebbrowser.dll, webbrowserapi.tlb, and all 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.