Platforms to show: All Mac Windows Linux Cross-Platform
Back to WebView2CookieManagerMBS class.
WebView2CookieManagerMBS.AddOrUpdateCookie(cookie as WebView2CookieMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
This method will fail if the domain of the given cookie is not specified.
WebView2CookieManagerMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
See also:
WebView2CookieManagerMBS.Constructor(cookie as WebView2CookieMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
Enables you to make a subclass and then initialize it with an existing cookie manager.
See also:
WebView2CookieManagerMBS.CopyCookie(Cookie as WebView2CookieMBS) as WebView2CookieMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
WebView2CookieManagerMBS.CreateCookie(Name as String, Value as String, Domain as String, Path as String) as WebView2CookieMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
One can set other optional properties after cookie creation. This only creates a cookie object and it is not added to the cookie manager until you call AddOrUpdateCookie. Leading or trailing whitespace(s), empty string, and special characters are not allowed for name. See WebView2CookieMBS class for more details.
WebView2CookieManagerMBS.DeleteAllCookies
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
This could affect other WebViews under the same user profile.
WebView2CookieManagerMBS.DeleteCookie(cookie as WebView2CookieMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
WebView2CookieManagerMBS.DeleteCookies(Name as String, URI as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
Cookie name is required. All cookies with the given name where domain and path match provided URI are deleted.
WebView2CookieManagerMBS.DeleteCookiesWithDomainAndPath(Name as String, Domain as string, Path as String)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
Cookie name is required. If domain is specified, deletes only cookies with the exact domain. If path is specified, deletes only cookies with the exact path.
WebView2CookieManagerMBS.GetCookies(URI as String = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
If uri is empty string or null, all cookies under the same profile are returned. You can modify the cookie objects by calling AddOrUpdateCookie, and the changes will be applied to the webview.
Calls GotCookies event later.
WebView2CookieManagerMBS.GetCookiesSync(URI as String = "") as WebView2CookieMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebView2 | MBS WinFrameworks Plugin | 23.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
If uri is empty string or null, all cookies under the same profile are returned. You can modify the cookie objects by calling AddOrUpdateCookie, and the changes will be applied to the webview.
This is the synchronous version, where we wait for cookies.
Some examples using this method:
The items on this page are in the following plugins: MBS WinFrameworks Plugin.