From 8a1870fce73f8bb06ea011fa13371feadbcdc369 Mon Sep 17 00:00:00 2001 From: wuxinzao Date: Thu, 11 Sep 2025 17:17:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CustomizeSchemes=E6=8E=A5=E5=8F=A3=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=AF=E9=80=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuxinzao --- api/@ohos.web.webview.d.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index ba83ec31ec..c83dfbc507 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -5562,6 +5562,23 @@ declare namespace webview { * @since 12 */ static customizeSchemes(schemes: Array): void; + /** + * Register Web custom schemes. + * @param { Array } schemes - Configuration of web custom scheme. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. 3. schemes size large than 10. 4. scheme size large than 32. 5. The character + * in the scheme is not within the allowed range of lowercase English letters, numbers, and the symbols + * ".", "+", "-". + * @param { boolean } lazyInitWebEngine - When true: The interface internally skips initializing WebEngine and + * temporarily stores the registered schemes, which will be passed to WebEngine when it actually + * initializes. When false: The interface automatically performs WebEngine initialization internally. + * @throws { BusinessError } 17100020 - Failed to register custom schemes. + * @static + * @syscap SystemCapability.Web.Webview.Core + * @atomicservice + * @since 21 dynamic&static + */ + static customizeSchemes(schemes: Array, lazyInitWebEngine: boolean): void; /** * Get certificate for the current website. -- Gitee From 57319ae27f82f236d4def806d70186375f4f12e0 Mon Sep 17 00:00:00 2001 From: wuxinzao Date: Fri, 12 Sep 2025 15:34:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A3=80=E8=A7=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuxinzao --- api/@ohos.web.webview.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api/@ohos.web.webview.d.ts b/api/@ohos.web.webview.d.ts index c83dfbc507..7a34b5def7 100644 --- a/api/@ohos.web.webview.d.ts +++ b/api/@ohos.web.webview.d.ts @@ -5564,15 +5564,17 @@ declare namespace webview { static customizeSchemes(schemes: Array): void; /** * Register Web custom schemes. + * * @param { Array } schemes - Configuration of web custom scheme. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. 3. schemes size large than 10. 4. scheme size large than 32. 5. The character - * in the scheme is not within the allowed range of lowercase English letters, numbers, and the symbols - * ".", "+", "-". - * @param { boolean } lazyInitWebEngine - When true: The interface internally skips initializing WebEngine and + * @param { boolean } lazyInitWebEngine - When true: The interface internally skips initializing WebEngine and * temporarily stores the registered schemes, which will be passed to WebEngine when it actually * initializes. When false: The interface automatically performs WebEngine initialization internally. * @throws { BusinessError } 17100020 - Failed to register custom schemes. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. The length of the schemes array is greater than 10. + * 2. The character length of the scheme is greater than 32. + * 3. The character in the scheme is not within the allowed range of lowercase English letters, numbers, + * and the symbols ".", "+", "-". * @static * @syscap SystemCapability.Web.Webview.Core * @atomicservice -- Gitee