From 5f51e4f708b48d030206c63869477c232d2f4f3e Mon Sep 17 00:00:00 2001 From: zhangb Date: Tue, 30 Aug 2022 06:53:19 +0000 Subject: [PATCH 1/4] update api/@internal/component/ets/web.d.ts. Signed-off-by: @i-am-a-little-bird Signed-off-by: zhangb --- api/@internal/component/ets/web.d.ts | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 67793d041..364b0023a 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -260,6 +260,36 @@ declare enum RenderExitReason { ProcessExitUnknown, } +/** + * Enum type supplied to {@link error} when onSslErrorEventReceive being called. + * @since 9 + */ + declare enum SslError { + /** + * General error. + * @since 9 + */ + Invalid, + + /** + * Hostname mismatch. + * @since 9 + */ + HostMismatch, + + /** + * The certificate date is invalid. + * @since 9 + */ + DateInvalid, + + /** + * The certificate authority is not trusted. + * @since 9 + */ + Untrusted, +} + /** * Enum type supplied to {@link FileSelectorParam} when onFileSelectorShow being called. * @since 9 @@ -435,6 +465,30 @@ declare class HttpAuthHandler { isHttpAuthInfoSaved(): boolean; } +/** + * Defines the ssl error request result, related to {@link onSslErrorEventReceive} method. + * @since 9 + */ + declare class SslErrorHandler { + /** + * Constructor. + * @since 9 + */ + constructor(); + + /** + * handleConfirm. + * @since 9 + */ + handleConfirm(): void; + + /** + * handleCancel. + * @since 9 + */ + handleCancel(): void; +} + /** * Defines the accessible resource type, related to {@link onPermissionRequest} method. * @since 9 @@ -1200,6 +1254,12 @@ declare class WebCookie { * @since 9 */ searchNext(forward: boolean): void; + + /** + * Clears the ssl cache in the Web. + * @since 8 + */ + clearSslCache(): void; } /** @@ -1657,6 +1717,14 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ onScroll(callback: (event: {xOffset: number, yOffset: number}) => void): WebAttribute; + + /** + * Triggered when the Web page receives an ssl Error. + * @param callback The triggered callback when the Web page receives an ssl Error. + * + * @since 9 + */ + onSslErrorEventReceive(callback: (event: { handler: SslErrorHandler, error: SslError }) => void): WebAttribute; } declare const Web: WebInterface; From 40e5846345745762189a2905437f7c3e7983f7cd Mon Sep 17 00:00:00 2001 From: zhangb Date: Fri, 2 Sep 2022 03:20:21 +0000 Subject: [PATCH 2/4] update api/@internal/component/ets/web.d.ts. Signed-off-by: @i-am-a-little-bird Signed-off-by: zhangb --- api/@internal/component/ets/web.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 364b0023a..2f1429d72 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -281,7 +281,7 @@ declare enum RenderExitReason { * The certificate date is invalid. * @since 9 */ - DateInvalid, + DateInvalid, /** * The certificate authority is not trusted. @@ -474,16 +474,16 @@ declare class HttpAuthHandler { * Constructor. * @since 9 */ - constructor(); + constructor(); /** - * handleConfirm. + * Confirm to use an SSL certificate. * @since 9 */ handleConfirm(): void; /** - * handleCancel. + * Cancel this request. * @since 9 */ handleCancel(): void; From fe1568e571e778dd145b50f985bcc4586616ea2f Mon Sep 17 00:00:00 2001 From: zhangb Date: Wed, 7 Sep 2022 10:49:00 +0000 Subject: [PATCH 3/4] update api/@internal/component/ets/web.d.ts. Signed-off-by: @i-am-a-little-bird Signed-off-by: zhangb --- api/@internal/component/ets/web.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 2f1429d72..599cfdd82 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -477,7 +477,7 @@ declare class HttpAuthHandler { constructor(); /** - * Confirm to use an SSL certificate. + * Confirm to use the SSL certificate. * @since 9 */ handleConfirm(): void; From f002058b32a958fb3e364d1822e0c1b331c73478 Mon Sep 17 00:00:00 2001 From: zhangb Date: Thu, 8 Sep 2022 14:08:03 +0000 Subject: [PATCH 4/4] update api/@internal/component/ets/web.d.ts. Signed-off-by: @i-am-a-little-bird Signed-off-by: zhangb --- api/@internal/component/ets/web.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 599cfdd82..208fdaa6f 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -1257,7 +1257,7 @@ declare class WebCookie { /** * Clears the ssl cache in the Web. - * @since 8 + * @since 9 */ clearSslCache(): void; }