From a07bf36694f8672be4528c8136746010a8e8f55d Mon Sep 17 00:00:00 2001 From: zhuzhengjun Date: Fri, 26 Jul 2024 15:29:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9cookies=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuzhengjun --- .../src/main/ets/components/plugin/MyCookieManager.ets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/MyCookieManager.ets b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/MyCookieManager.ets index 9c83c01f..e1faa9ba 100644 --- a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/MyCookieManager.ets +++ b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/MyCookieManager.ets @@ -98,7 +98,7 @@ export default class MyCookieManager extends ChannelDelegateImpl { public setCookie(url: string, name: string, value: string, domain: string, path: string, expiresDate: number | null, maxAge: number, isSecure: boolean, isHttpOnly: boolean, sameSite: string, result: MethodResult): void { - if(web_webview.WebCookieManager.isCookieAllowed()) { + if(!web_webview.WebCookieManager.isCookieAllowed()) { result.success(false); return; } @@ -196,7 +196,7 @@ export default class MyCookieManager extends ChannelDelegateImpl { } public deleteCookie(url: string, name: string, domain: string, path: string, result: MethodResult): void { - if(web_webview.WebCookieManager.isCookieAllowed()) { + if(!web_webview.WebCookieManager.isCookieAllowed()) { result.success(false); return; } @@ -214,7 +214,7 @@ export default class MyCookieManager extends ChannelDelegateImpl { } public deleteCookies(url: string, domain: string, path: string, result: MethodResult): void { - if(web_webview.WebCookieManager.isCookieAllowed()) { + if(!web_webview.WebCookieManager.isCookieAllowed()) { result.success(false); return; } @@ -236,7 +236,7 @@ export default class MyCookieManager extends ChannelDelegateImpl { } public deleteAllCookies(result: MethodResult): void { - if(web_webview.WebCookieManager.isCookieAllowed()) { + if(!web_webview.WebCookieManager.isCookieAllowed()) { result.success(false); return; } @@ -250,7 +250,7 @@ export default class MyCookieManager extends ChannelDelegateImpl { } public removeSessionCookies(result: MethodResult): void { - if(web_webview.WebCookieManager.isCookieAllowed()) { + if(!web_webview.WebCookieManager.isCookieAllowed()) { result.success(false); return; } -- Gitee