-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
@ajtruckle You might just need to point your app to use the Canary WebView2 by following steps here. Initialize your webview2 with
CoreWebView2EnvironmentOptions.ChannelSearchKind
Originally posted by @pushkin- in #1737
I would like to adapt my code to use this concept. At the moment I have:
void CWebBrowser::InitializeWebView()
{
CloseWebView();
CString subFolder = GetInstallPath();
CString appData = GetUserDataFolder();
auto options = Microsoft::WRL::Make<CoreWebView2EnvironmentOptions>();
CHECK_FAILURE(options->put_AdditionalBrowserArguments(L"--allow-file-access-from-files"));
HRESULT hr = CreateCoreWebView2EnvironmentWithOptions(
subFolder,
appData,
options.Get(),
Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>(
this,
&CWebBrowser::OnCreateEnvironmentCompleted).Get());
if (!SUCCEEDED(hr))
{
CString text;
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
{
text = L"Cannot found the WebView2 component.";
}
else
{
text = L"Cannot create the webview environment.";
}
ShowFailure(hr, text);
}
}I am not sure how to tweak this to use the put_ChannelSearchKind(COREWEBVIEW2_CHANNEL_SEARCH_KIND value) property instead of the folder.
I want to temporarily set it to COREWEBVIEW2_CHANNEL_SEARCH_KIND_LEAST_STABLE.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels