Web View2Environment. New Browser Version Available Event
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
NewBrowserVersionAvailable is raised when a newer version of the WebView2 Runtime is installed and available using WebView2.
public event EventHandler<object> NewBrowserVersionAvailable;
member this.NewBrowserVersionAvailable : EventHandler<obj>
Public Custom Event NewBrowserVersionAvailable As EventHandler(Of Object)
To use the newer version of the browser you must create a new environment and WebView. The event is only raised for new version from the same WebView2 Runtime from which the code is running. When not running with installed WebView2 Runtime, no event is raised.
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 WebViews 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.