Add a space after "We detected there is a new version for the browser." to separate the two sentences.
Change "Do you want to restart the app?" to "Do you want to restart the WebView2APISample app?"
I got this dialog out of the blue with no context. Add the name of the sample app in the dialog box to give context and indicate which app is referred to by the dialog.
Change "We detected there is a new version for the browser." to eg "A new version of Microsoft Edge is available on this machine."
A comment reads "This handler tells when there is a new Edge version available on the machine."
Maybe add hint words to clarify why would i want to re-create a webview.
L"We detected there is a new version for the browser.";
if (m_webView)
{
message += L"Do you want to restart the app? \n\n";
message +=
L"Click No if you only want to re-create the webviews. \n";
message += L"Click Cancel for no action. \n";
}
I opened https://github.com/MicrosoftEdge/WebView2Samples/pull/186 to fix this issue.
https://github.com/MicrosoftEdge/WebView2Samples/blob/main/SampleApps/WebView2APISample/AppWindow.cpp#L1806-L1814