From 579ee6ae520b6226cd77b86347a755d620878241 Mon Sep 17 00:00:00 2001 From: bigpumpkin Date: Thu, 23 Jun 2022 10:48:34 +0000 Subject: [PATCH] update api/@internal/component/ets/web.d.ts. Signed-off-by: @bigpumpkin --- api/@internal/component/ets/web.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index bfb3e08770..3c7d8c0620 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -288,6 +288,12 @@ declare class JsResult { * @since 8 */ handleConfirm(): void; + + /** + * Handle the user's JavaScript result if confirm the prompt dialog. + * @since 9 + */ + handlePromptConfirm(result: string): void; } /** @@ -1120,6 +1126,14 @@ declare class WebAttribute extends CommonMethod { */ onConfirm(callback: (event?: { url: string, message: string, result: JsResult }) => boolean): WebAttribute; + /** + * Triggered when the web page wants to display a JavaScript prompt() dialog. + * @param callback The Triggered function when the web page wants to display a JavaScript prompt() dialog. + * + * @since 9 + */ + onPrompt(callback: (event?: {url: string, message: string, value: string, result: JsResult }) => boolean): WebAttribute; + /** * Triggered when the web page receives a JavaScript console message. * @param callback The triggered function when the web page receives a JavaScript console message. -- Gitee