mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-08 07:36:38 +00:00
!2578 【新增特性】支持webview的https的双向校验 - SSL错误通知
Merge pull request !2578 from zhangb/master
This commit is contained in:
commit
cc715c7ff1
68
api/@internal/component/ets/web.d.ts
vendored
68
api/@internal/component/ets/web.d.ts
vendored
@ -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();
|
||||
|
||||
/**
|
||||
* Confirm to use the SSL certificate.
|
||||
* @since 9
|
||||
*/
|
||||
handleConfirm(): void;
|
||||
|
||||
/**
|
||||
* Cancel this request.
|
||||
* @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 9
|
||||
*/
|
||||
clearSslCache(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1665,6 +1725,14 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
|
||||
* @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;
|
||||
|
Loading…
Reference in New Issue
Block a user