This page demonstrates basic cookie management.
Press ctrl+t
to open another WebView under the same WebView2 environment that navigates to https://www.bing.com.
One can start off by getting the cookie manager associated with the WebView2 by using
ICoreWebView2::get_CookieManager
.
One can use the cookie manager to get an ICoreWebView2CookieList
that contains the ICoreWebView2Cookie
s that are associated with the specified URI.
Try clicking the Get cookies button below. If calling GetCookies
with an empty URI, all cookies under the same profile are
returned.
One can set a cookie by first creating a cookie object calling ICoreWebView2CookieManager::CreateCookie
.