From 1297baf2478df5f8bd16d45d85179961869b48ca Mon Sep 17 00:00:00 2001 From: fenggechang Date: Wed, 30 Jul 2025 10:24:41 +0800 Subject: [PATCH] =?UTF-8?q?SDK=20overload=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fenggechang --- api/@internal/component/ets/web.d.ts | 43 +++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 7f4241f710..896e309840 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -4745,8 +4745,7 @@ declare class EventResult { * Default value: true. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setGestureEventResult(result: boolean): void; @@ -4763,11 +4762,47 @@ declare class EventResult { * {@code false} Indicates the propagation of events farther along. * Default value: true. * @syscap SystemCapability.Web.Webview.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ setGestureEventResult(result: boolean, stopPropagation: boolean): void; + /** + * Set whether the event is consumed. + * + * @param { boolean } result - Whether to consume the gesture event. + * {@code true} Indicates the consumption of the gesture event. + * {@code false} Indicates the non-consumption of the gesture event. + * Default value: true. + * @syscap SystemCapability.Web.Webview.Core + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + setGestureEventResultWithResult(result: boolean): void; + + /** + * Sets the gesture event consumption result. + * + * @param { boolean } result - Whether to consume the gesture event. + * {@code true} Indicates the consumption of the gesture event. + * {@code false} Indicates the non-consumption of the gesture event. + * Default value: true. + * @param { boolean } stopPropagation - Whether to stop propagation. + * This parameter is valid only when result is set to true. + * {@code true} Indicates stops the propagation of events farther along. + * {@code false} Indicates the propagation of events farther along. + * Default value: true. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + * @arkts 1.2 + */ + setGestureEventResultWithResultStopPropagation(result: boolean, stopPropagation: boolean): void; + + /** + * @arkts 1.2 + */ + overload setGestureEventResult { setGestureEventResultWithResult, setGestureEventResultWithResultStopPropagation }; + /** * Sets the mouse event consumption result. * -- Gitee