Microsoft edge webview211/3/2023 ![]() Public HRESULT CreateCoreWebView2Controller(HWND parentWindow, ICoreWebView2CreateCoreWebView2ControllerCompletedHandler * handler) M_mainWindow, message.c_str(), L"New available version", L"Click No if you only want to re-create the webviews. Message += L"Do you want to restart the app? \n\n" L"We detected there is a new version for the browser." Don't block the event handler with a message box (ICoreWebView2Environment* sender, IUnknown* args) -> HRESULT This handler tells when there is a new Edge version available on the machine.ĬHECK_FAILURE(m_webViewEnvironment->add_NewBrowserVersionAvailable( ![]() register a handler for the NewBrowserVersionAvailable event. After the environment is successfully created, Or simply prompt the user to restart the app. ![]() When not running with installed WebView2 Runtime, no event is run.īecause 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. The event only runs for new version from the same WebView2 Runtime from which the code is running. To use the newer version of the browser you must create a new environment and WebView. NewBrowserVersionAvailable runs when a newer version of the WebView2 Runtime is installed and available using WebView2. Public HRESULT add_NewBrowserVersionAvailable( ICoreWebView2NewBrowserVersionAvailableEventHandler * eventHandler, EventRegistrationToken * token) Using it in different environments are not guaranteed to be compatible and may fail. WebViews created from an environment run on the browser process specified with environment parameters and objects created from an environment should be used in the same environment. Remove an event handler previously added with add_NewBrowserVersionAvailable. The browser version info of the current ICoreWebView2Environment, including channel name if it is not the WebView2 Runtime. Summary MembersĪdd an event handler for the NewBrowserVersionAvailable event.Ĭreate a new web resource response object. For the latest API reference, see WebView2 API Reference. This reference is no longer being maintained.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |