From 1bbfcc1c1735b4908c04d1b5b58fe42dab3dd936 Mon Sep 17 00:00:00 2001 From: LvJunMao Date: Thu, 29 May 2025 03:55:13 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=8E=A7=E5=88=B6window.screen.availWidth/Height=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=B1=8F=E5=B9=95=E5=AE=BD=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LvJunMao --- api/@ohos.web.webview.d.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index efe47c1635..e363e55c4f 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -2075,6 +2075,27 @@ declare namespace webview { static clearSessionCookie(callback: AsyncCallback): void; } + /** + * Enum type indicates the web standard api. + * @enum { number } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + enum StandardWebAPI { + /** + * This is the window.screen.availWidth interface. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + SCREEN_AVAIL_WIDTH, + /** + * This is the window.screen.availHeight interface. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + SCREEN_AVAIL_HEIGHT + } + /** * Enum type supplied to {@link onMessageEventExt} for indicating the type of web message. * @@ -3667,6 +3688,15 @@ declare namespace webview { */ static setWebDebuggingAccess(webDebuggingAccess: boolean): void; + /** + * Sets the web standard api follow w3c standard. + * + * @param { Array } config - the config of the web standard api list. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + static enaleFollowStandardWebAPI(config: Array): void; + /** * Enable the ability to check website security risks. * Illegal and fraudulent websites are mandatory enabled and can't be disabled by this function. -- Gitee From 41260129a79ff1a1b8c28bd3e14b6a767a854cc3 Mon Sep 17 00:00:00 2001 From: LvJunMao Date: Thu, 29 May 2025 04:57:56 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0static=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LvJunMao --- api/@ohos.web.webview.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index e363e55c4f..f07eb68623 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -3692,10 +3692,11 @@ declare namespace webview { * Sets the web standard api follow w3c standard. * * @param { Array } config - the config of the web standard api list. + * @static * @syscap SystemCapability.Web.Webview.Core * @since 20 */ - static enaleFollowStandardWebAPI(config: Array): void; + static enableFollowStandardWebAPI(config: Array): void; /** * Enable the ability to check website security risks. -- Gitee From 965fe274c329fbd04dcf13573e76a80585858b9d Mon Sep 17 00:00:00 2001 From: LvJunMao Date: Fri, 30 May 2025 03:54:21 +0000 Subject: [PATCH 3/5] =?UTF-8?q?web=E7=BB=84=E4=BB=B6=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=82=E6=95=B0=E6=8E=A7=E5=88=B6w3c=20api?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=A0=87=E5=87=86=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LvJunMao --- 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 ade286994b..469c31ff09 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -4656,6 +4656,27 @@ declare class WebController { getCookieManager(): WebCookie; } + /** + * Enum type indicates the web standard api. + * @enum { number } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ +declare enum StandardWebAPIType { + /** + * This is the window.screen.availWidth interface. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + SCREEN_AVAIL_WIDTH, + /** + * This is the window.screen.availHeight interface. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + SCREEN_AVAIL_HEIGHT +} + /** * Defines the Web options. * @@ -4801,6 +4822,15 @@ declare interface WebOptions { * @since 12 */ sharedRenderProcessToken? : string; + /** + * Sets the web standard api follow w3c standard. + * + * @param { Array } standardWebAPI - the config of the web standard api list. + * @static + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + standardWebAPI?: Array } /** -- Gitee From 920aec6169309e1e5276507dcab9a5ba28107d19 Mon Sep 17 00:00:00 2001 From: LvJunMao Date: Fri, 30 May 2025 03:55:43 +0000 Subject: [PATCH 4/5] update api/@ohos.web.webview.d.ts. Signed-off-by: LvJunMao --- api/@ohos.web.webview.d.ts | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index f07eb68623..efe47c1635 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -2075,27 +2075,6 @@ declare namespace webview { static clearSessionCookie(callback: AsyncCallback): void; } - /** - * Enum type indicates the web standard api. - * @enum { number } - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - enum StandardWebAPI { - /** - * This is the window.screen.availWidth interface. - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - SCREEN_AVAIL_WIDTH, - /** - * This is the window.screen.availHeight interface. - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - SCREEN_AVAIL_HEIGHT - } - /** * Enum type supplied to {@link onMessageEventExt} for indicating the type of web message. * @@ -3688,16 +3667,6 @@ declare namespace webview { */ static setWebDebuggingAccess(webDebuggingAccess: boolean): void; - /** - * Sets the web standard api follow w3c standard. - * - * @param { Array } config - the config of the web standard api list. - * @static - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - static enableFollowStandardWebAPI(config: Array): void; - /** * Enable the ability to check website security risks. * Illegal and fraudulent websites are mandatory enabled and can't be disabled by this function. -- Gitee From d12493501e19fc2913ba84319b8278218d6297f7 Mon Sep 17 00:00:00 2001 From: LvJunMao Date: Fri, 30 May 2025 04:59:25 +0000 Subject: [PATCH 5/5] update api/@internal/component/ets/web.d.ts. Signed-off-by: LvJunMao --- api/@internal/component/ets/web.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 469c31ff09..3ea26f44fa 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -4825,8 +4825,7 @@ declare interface WebOptions { /** * Sets the web standard api follow w3c standard. * - * @param { Array } standardWebAPI - the config of the web standard api list. - * @static + * @type { ?Array } * @syscap SystemCapability.Web.Webview.Core * @since 20 */ -- Gitee