Platforms to show: All Mac Windows Linux Cross-Platform

WebView2CookieMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class WebView2 MBS WinFrameworks Plugin 23.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Provides a set of properties that are used to manage a cookie.
Example
// This example needs a window with WebView2ControlMBS1.
// list the cookies the WebView2 control has for a site
// Cookies is a property of the window: Cookies As WebView2CookieManagerMBS
Cookies = WebView2ControlMBS1.CookieManager
AddHandler Cookies.GotCookies, AddressOf GotCookies
Cookies.GetCookies("https://www.monkeybreadsoftware.de/")

// a method in the window:
Sub GotCookies(manager As WebView2CookieManagerMBS, ErrorCode As Integer, Cookies() As WebView2CookieMBS)
For Each c As WebView2CookieMBS In Cookies
System.DebugLog c.Domain + c.Path + " " + c.Name + "=" + c.Value + If(c.IsSession, " (session)", "") + If(c.IsSecure, " (secure)", "")
Next
End Sub

All functions may raise WebView2ExceptionMBS in case of errors.
Requires WebView2 version 1.0.705.50 from January 2021.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Same Site Rules

Constant Value Description
kCookieSameSiteKindLax 1 Lax.
kCookieSameSiteKindNone 0 None.
kCookieSameSiteKindStrict 2 Strict.

This class has no subclasses.

Blog Entries

Release notes

Some methods using this class:

Some events using this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS WinFrameworks Plugin.


WebView2CookieManagerMBS   -   WebView2ExceptionMBS


The biggest plugin in space...