WebViewPanelCookieManager

Desktop-specific cookie operations backed by the internal native panel cookie store.

This type is available through controller.cookies.impl on desktop/JVM. It exposes mutation operations that are not part of the common CookieManager API because Android and iOS already expose their native managers directly through their own CookieManager.impl types.

Supported structured cookie properties on the desktop native bridge are:

KeyMeaning
nameCookie name. Required and must not be empty.
valueCookie value. Required.
domainCookie domain. Defaults to the host from the URI when omitted during mutation.
pathCookie path. Defaults to the URI's default cookie path when omitted during mutation.
expiresExpiration timestamp in milliseconds since Unix epoch.
httpOnlyBoolean string: true, 1, yes, false, 0, or no.
secureBoolean string with the same accepted values as httpOnly.
sessionBoolean string. Defaults to true when expires is absent.
sameSiteNONE, LAX, or STRICT where supported by the native backend.

Mutation methods currently require cookie objects returned by this desktop backend. Passing an arbitrary Cookie implementation throws IllegalArgumentException because the native bridge needs the structured property map described above.

Functions

Link copied to clipboard
fun all(uri: String): Set<Cookie>

Returns all cookies that apply to uri in the desktop WebView cookie store.

Link copied to clipboard
fun clearAll()

Removes all cookies from the desktop WebView cookie store.

Link copied to clipboard
fun putCookie(uri: String, cookie: Cookie)

Stores or updates cookie for uri in the desktop WebView cookie store.

Link copied to clipboard
fun removeCookie(uri: String, cookie: Cookie)

Removes cookie from uri in the desktop WebView cookie store.