interface ICoreWebView2Experimental8

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2Experimental8
  : public IUnknown

Used to get ICoreWebView2ExperimentalProfile object.

Summary

Members Descriptions
get_Profile The associated ICoreWebView2ExperimentalProfile object.
        auto webview2Experimental8 = coreWebView2.try_query<ICoreWebView2Experimental8>();
        if (webview2Experimental8)
        {
            wil::com_ptr<ICoreWebView2ExperimentalProfile> profile;
            CHECK_FAILURE(webview2Experimental8->get_Profile(&profile));
            wil::unique_cotaskmem_string profile_path;
            CHECK_FAILURE(profile->get_ProfilePath(&profile_path));
            std::wstring str(profile_path.get());
            m_profileDirName = str.substr(str.find_last_of(L'\\') + 1);
            BOOL inPrivate = FALSE;
            CHECK_FAILURE(profile->get_IsInPrivateModeEnabled(&inPrivate));
            if (!m_webviewOption.downloadPath.empty())
            {
                auto webView2ExperimentalProfile3 =
                    profile.try_query<ICoreWebView2ExperimentalProfile3>();
                CHECK_FAILURE(webView2ExperimentalProfile3->
                    put_DefaultDownloadFolderPath(
                        m_webviewOption.downloadPath.c_str()));
            }

            // update window title with m_profileDirName
            UpdateAppTitle();

            // update window icon
            SetAppIcon(inPrivate);
        }

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease 1.0.1018

Members

get_Profile

The associated ICoreWebView2ExperimentalProfile object.

public HRESULT get_Profile(ICoreWebView2ExperimentalProfile ** value)