From 923ac3a5561dda64eb4b42fbc67c305ca9a56232 Mon Sep 17 00:00:00 2001 From: zhengyutao Date: Tue, 17 Jun 2025 10:30:47 +0800 Subject: [PATCH] =?UTF-8?q?DidFailWithError=E6=98=93=E7=94=A8=E6=80=A7?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhengyutao --- api/@ohos.web.webview.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index e0d53d744f..e8df98b902 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -7834,6 +7834,20 @@ declare namespace webview { * @since 12 */ didFail(code: WebNetErrorList): void; + + /** + * Notify that this request should be failed. + * + * @param { WebNetErrorList } code - Set response error code to intercept. + * @param { boolean } completeIfNoResponse - If completeIfNoResponse is true, when DidFailWithError is called, if + * DidReceiveResponse has not been called, a response is automatically + * constructed and the current request is terminated. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. + * @throws { BusinessError } 17100021 - The resource handler is invalid. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + didFail(code: WebNetErrorList, completeIfNoResponse: boolean): void; } /** -- Gitee