diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 9705ccca7955acd0585f48d5f1e8b1ae23f33b08..a00c644de167b70c20b681b6803a0dc38ee41802 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -698,6 +698,18 @@ declare class WebCookie { */ zoom(factor: number): void; + /** + * Let the Web zoom in. + * @since 9 + */ + zoomIn(): boolean; + + /** + * Let the Web zoom out. + * @since 9 + */ + zoomOut(): boolean; + /** * Clears the history in the Web. * @since 8 @@ -762,6 +774,24 @@ declare class WebCookie { */ getHitTest(): HitTestType; + /** + * Gets the id for the current Web. + * @since 9 + */ + getWebId(): number; + + /** + * Gets the title of current Web page. + * @since 9 + */ + getTitle(): number; + + /** + * Gets the content height of current Web page. + * @since 9 + */ + getPageHeight(): number; + /** * Gets the request focus. * @since 8 @@ -800,6 +830,12 @@ declare class WebCookie { */ forward(); + /** + * Goes forward or back backOrForward in the history of the web page. + * @since 9 + */ + backOrForward(step: number): void; + /** * Gets network cookie manager * @since 9 @@ -980,6 +1016,14 @@ declare class WebAttribute extends CommonMethod { */ databaseAccess(databaseAccess: boolean): WebAttribute; + /** + * Sets the initial scale for the Web. + * @param percent the initial scale for the Web. + * + * @since 9 + */ + initialScale(percent: number): WebAttribute; + /** * Sets the Web's user agent. * @param userAgent The Web's user agent. @@ -1169,6 +1213,22 @@ declare class WebAttribute extends CommonMethod { * @deprecated since 9 */ onFileSelectorShow(callback: (event?: { callback: Function, fileSelector: object }) => void): WebAttribute; + + /** + * Triggered when the url loading. + * @param callback The triggered when the url loading. + * + * @since 9 + */ + onResourceLoad(callback: (event: {url: string}) => void): WebAttribute; + + /** + * Triggered when the scale of WebView changed. + * @param callback The triggered when the scale of WebView changed. + * + * @since 9 + */ + onScaleChange(callback: (event: {oldScale: number, newScale: number}) => void): WebAttribute; } declare const Web: WebInterface;