The OpenD Programming Language

ICoreWebView2Environment.add_NewBrowserVersionAvailable

Add an event handler for the NewBrowserVersionAvailable event. NewBrowserVersionAvailable runs when a newer version of the WebView2 Runtime is installed and available using WebView2. To use the newer version of the browser you must create a new environment and WebView. The event only runs for new version from the same WebView2 Runtime from which the code is running. When not running with installed WebView2 Runtime, no event is run.

Because a user data folder is only able to be used by one browser process at a time, if you want to use the same user data folder in the WebView using the new version of the browser, you must close the environment and instance of WebView that are using the older version of the browser first. Or simply prompt the user to restart the app.

\snippet AppWindow.cpp NewBrowserVersionAvailable

interface ICoreWebView2Environment
HRESULT
add_NewBrowserVersionAvailable

Meta