Skip to content

Commit e0d2903

Browse files
committed
Added logs for the cookies in wasmJs
1 parent c972ab6 commit e0d2903

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • webview-compose/src/wasmJsMain/kotlin/io/github/kdroidfilter/webview/cookie

webview-compose/src/wasmJsMain/kotlin/io/github/kdroidfilter/webview/cookie/Cookie.wasmJs.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ object WasmJsCookieManager : CookieManager {
2323
cookie: Cookie
2424
) {
2525
// Set the cookie using the document.cookie API
26+
KLogger.w(tag = "WasmJsCookieManager") {
27+
"removeCookies(url=$url): URL-specific cookie set is not supported in browser context. Cookies for different domain will be ignored."
28+
}
2629
document.cookie = cookie.toString()
2730
}
2831

@@ -33,6 +36,9 @@ object WasmJsCookieManager : CookieManager {
3336
if (cookiesStr.isEmpty()) {
3437
return emptyList()
3538
}
39+
KLogger.w(tag = "WasmJsCookieManager") {
40+
"getCookies(url=$url): URL-specific cookies get is not supported in browser context. Returning only cookies for the current domain."
41+
}
3642

3743
return cookiesStr.split(";").map { cookieStr ->
3844
val parts = cookieStr.trim().split("=", limit = 2)

0 commit comments

Comments
 (0)