PlatformStorageEngine

Handles cookie management and web storage clearing for the platform backend.

Important Platform Limitation: Android WebView's CookieManager and WebStorage are process-global. Per-session isolated cookie jars are not supported by the Android WebView API. Isolation between sessions is achieved by explicit clearing (clearCookies, clearStorage), not per-session storage separation.

Constructors

Link copied to clipboard
constructor(session: PageSession, scriptEngine: PlatformScriptEngine, config: BrowserConfig)

Functions

Link copied to clipboard
suspend fun clearCookies(): Boolean

Clears all process-global cookies.

Link copied to clipboard
suspend fun clearStorage()

Clears local storage, session storage, and IndexedDB for the current page origin, as well as process-global WebStorage.

Link copied to clipboard
suspend fun getCookies(url: String): List<Cookie>

Retrieves cookies set for the specified url.

Link copied to clipboard
suspend fun setCookie(cookie: Cookie): Boolean

Sets a cookie for the specified url or domain.

suspend fun setCookie(url: String, cookieHeader: String): Boolean

Sets a cookie string for the specified url.