diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 174c30b769e31f7005a36aaa9b158e0f7bb341fa..f074bc1eeb505a03d9a2fa52c710a57c357d72fa 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -6062,7 +6062,7 @@ declare interface OnBeforeUnloadEvent { } /** - * Defines the triggered function when the web page wants to display a JavaScript confirm() dialog. + * Defines callback triggered when confirm() is invoked by the web page. * * @typedef OnConfirmEvent * @syscap SystemCapability.Web.Webview.Core @@ -8427,17 +8427,17 @@ declare class WebAttribute extends CommonMethod { onRequestSelected(callback: () => void): WebAttribute; /** - * Triggered when the Web wants to display a JavaScript alert() dialog. + * Triggered when alert() is invoked to display an alert dialog box on the web page. * - * @param { function } callback The triggered function when the web page wants to display a JavaScript alert() dialog. + * @param { function } callback Callback used when alert() is invoked to display an alert dialog box on the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 8 */ /** - * Triggered when the Web wants to display a JavaScript alert() dialog. + * Triggered when alert() is invoked to display an alert dialog box on the web page. * - * @param { function } callback The triggered function when the web page wants to display a JavaScript alert() dialog. + * @param { function } callback Callback used when alert() is invoked to display an alert dialog box on the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -8445,9 +8445,9 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the Web wants to display a JavaScript alert() dialog. + * Triggered when alert() is invoked to display an alert dialog box on the web page. * - * @param { Callback } callback The triggered function when the web page wants to display a JavaScript alert() dialog. + * @param { Callback } callback Callback used when alert() is invoked to display an alert dialog box on the web page. * {@code true} means the application can invoke custom pop-up dialog capabilities (with confirmation and cancellation buttons). * Developers need to use the JsResult interface to notify the web component whether to leave the current page * according to the user's choice. @@ -8499,17 +8499,17 @@ declare class WebAttribute extends CommonMethod { onBeforeUnload(callback: Callback): WebAttribute; /** - * Triggered when the web page wants to display a JavaScript confirm() dialog. + * Triggered when confirm() is invoked by the web page. * - * @param { function } callback The Triggered function when the web page wants to display a JavaScript confirm() dialog. + * @param { function } callback Callback triggered when confirm() is invoked by the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 8 */ /** - * Triggered when the web page wants to display a JavaScript confirm() dialog. + * Triggered when confirm() is invoked by the web page. * - * @param { function } callback The Triggered function when the web page wants to display a JavaScript confirm() dialog. + * @param { function } callback Callback triggered when confirm() is invoked by the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -8517,9 +8517,9 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the web page wants to display a JavaScript confirm() dialog. + * Triggered when confirm() is invoked by the web page. * - * @param { Callback } callback The triggered function when the web page wants to display a JavaScript confirm() dialog. + * @param { Callback } callback Callback triggered when confirm() is invoked by the web page. * {@code true} means the application can call the custom pop-up capability (including confirmation and cancellation), and needs to call JsResult * to notify the Web component whether to leave the current page based on the user's confirmation or cancellation operation. * {@code false} means the custom pop-up drawn in the function is invalid. @@ -8533,17 +8533,17 @@ declare class WebAttribute extends CommonMethod { onConfirm(callback: Callback): WebAttribute; /** - * Triggered when the web page wants to display a JavaScript prompt() dialog. + * Triggered when prompt() is invoked by the web page. * - * @param { function } callback The Triggered function when the web page wants to display a JavaScript prompt() dialog. + * @param { function } callback Callback used when prompt() is invoked by the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 */ /** - * Triggered when the web page wants to display a JavaScript prompt() dialog. + * Triggered when prompt() is invoked by the web page. * - * @param { function } callback The Triggered function when the web page wants to display a JavaScript prompt() dialog. + * @param { function } callback Callback used when prompt() is invoked by the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -8551,9 +8551,9 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the web page wants to display a JavaScript prompt() dialog. + * Triggered when prompt() is invoked by the web page. * - * @param { Callback } callback The triggered function when the web page wants to display a JavaScript prompt() dialog. + * @param { Callback } callback Callback used when prompt() is invoked by the web page. * {@code true} means the application can call the custom pop-up window capability (including confirmation, cancellation, and input),and needs to * call JsResult to notify the Web component of the final processing result based on the user's confirmation or cancellation operation. * {@code false} means the pop-up window processing result is considered as a cancellation. @@ -10708,7 +10708,6 @@ declare class WebAttribute extends CommonMethod { * * @param { boolean } enable {@code true} means the Web will not comply with the zoom restrictions * set by thetag on the webpage; {@code false} otherwise. - * The default value is false. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 21 diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index ba83ec31ec8820b69037162e42008a37c2a80d5f..2046484cdd5bddc6c804d1f7b7edaf2a3d9d9870 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -4273,10 +4273,12 @@ declare namespace webview { storeWebArchive(baseName: string, autoName: boolean, callback: AsyncCallback): void; /** - * Let the Web zoom by. + * Zooms in or out of this web page. This API is effective only when zoomAccess is true. * - * @param { number } factor - The zoom factor. - * Reduced when the input parameter is less than 1. Enlarged when the input parameter is greater than 1.Value range: (0, 100]. + * @param { number } factor - Relative zoom ratio. The value must be greater than 0. + * The value 1 indicates that the page is not zoomed. + * A value smaller than 1 indicates zoom-out, and a value greater than 1 indicates zoom-in. + * Value range: (0, 100]. * @throws { BusinessError } 401 - Invalid input parameter. * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component. @@ -4285,13 +4287,12 @@ declare namespace webview { * @since 9 */ /** - * Let the Web zoom by. + * Zooms in or out of this web page. This API is effective only when zoomAccess is true. * - *

API Note:
- * zoomAccess must be true. - *

- * - * @param { number } factor - The zoom factor. + * @param { number } factor - Relative zoom ratio. The value must be greater than 0. + * The value 1 indicates that the page is not zoomed. + * A value smaller than 1 indicates zoom-out, and a value greater than 1 indicates zoom-in. + * Value range: (0, 100]. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 17100001 - Init error. @@ -4305,7 +4306,7 @@ declare namespace webview { zoom(factor: number): void; /** - * Let the Web zoom in. + * Zooms in on this web page by 25%. * * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component. @@ -4314,7 +4315,7 @@ declare namespace webview { * @since 9 */ /** - * Let the Web zoom in. + * Zooms in on this web page by 25%. * * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component. @@ -4324,8 +4325,7 @@ declare namespace webview { * @since 11 */ /** - * Let the Web zoom in. - * Call this interface to enlarge the current page by 25%. + * Zooms in on this web page by 25%. * * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component. @@ -4338,7 +4338,7 @@ declare namespace webview { zoomIn(): void; /** - * Let the Web zoom out. + * Zooms out of this web page by 20%. * * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component. @@ -4347,7 +4347,7 @@ declare namespace webview { * @since 9 */ /** - * Let the Web zoom out. + * Zooms out of this web page by 20%. * * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component. @@ -4357,8 +4357,7 @@ declare namespace webview { * @since 11 */ /** - * Let the Web zoom out. - * Call this interface to shrink the current page by 20%. + * Zooms out of this web page by 20%. * * @throws { BusinessError } 17100001 - Init error. * The WebviewController must be associated with a Web component.