From 01363cc938e14c7df047966026d19fc01d73f1e5 Mon Sep 17 00:00:00 2001 From: zhengyutao Date: Wed, 25 Jun 2025 15:17:00 +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 6f50947734..5911146701 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -8016,6 +8016,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 } 17100101 - The errorCode is either ARKWEB_NET_OK or outside the range of error codes + * in WebNetErrorList. + * @throws { BusinessError } 17100021 - The resource handler is invalid. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + didFail(code: WebNetErrorList, completeIfNoResponse: boolean): void; } /** -- Gitee