From ef58be4415902c75bc3e80b9c082f7e5c89a1d15 Mon Sep 17 00:00:00 2001 From: wzztoone Date: Mon, 14 Feb 2022 11:59:00 +0800 Subject: [PATCH] add web api Signed-off-by: wzztoone Change-Id: I7939b94fa13b11bb706120ba8633235a7bd3b09a --- api/@internal/component/ets/web.d.ts | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 00ea08058b..a4b0703874 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -255,6 +255,36 @@ declare class WebAttribute extends CommonMethod { */ onPageEnd(callback: (event?: { url: string }) => void): WebAttribute; + /** + * Triggered at the begin of web page loading + * @since 8 + */ + onPageBegin(callback: (event?: { url: string }) => void): WebAttribute; + + /** + * Triggered when the page loading progress changes + * @since 8 + */ + onProgressChange(callback: (event?: { newProgress: number }) => void): WebAttribute; + + /** + * Triggered when the title of the main application document changes + * @since 8 + */ + onTitleReceive(callback: (event?: { title: string }) => void): WebAttribute; + + /** + * Triggered when the host application is notified that a previously invoked geolocation permission request onGeolocationShow() has been canceled. Therefore, any related UI should be hidden. + * @since 8 + */ + onGeolocationHide(callback: () => void): WebAttribute; + + /** + * Triggered when notifies the host application that web content from the specified source is attempting to use the Geolocation API + * @since 8 + */ + onGeolocationShow(callback: (event?: { origin: string, callback: Function }) => void): WebAttribute; + /** * Get WebView focus callback event * @since 8 -- Gitee