From 8a2b2d18fed914e8cab308196a818ef8bc29bc72 Mon Sep 17 00:00:00 2001 From: leafly2021 Date: Mon, 7 Mar 2022 20:16:02 +0800 Subject: [PATCH] fixed 4bcad5e from https://gitee.com/leafly2021/interface_sdk-js/pulls/961 modify create permisson Signed-off-by: leafly2021 Change-Id: Ic5dba889a6c866f6016405f3148fd86dbd37a962 --- api/@ohos.window.d.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 69c33f7bf3..0609aa55d6 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -278,6 +278,7 @@ declare namespace window { * Create a sub window with a specific id and type, only support 7. * @param id Indicates window id. * @param type Indicates window type. + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW * @since 7 */ function create(id: string, type: WindowType, callback: AsyncCallback): void; @@ -286,6 +287,7 @@ declare namespace window { * Create a sub window with a specific id and type, only support 7. * @param id Indicates window id. * @param type Indicates window type. + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW * @since 7 */ function create(id: string, type: WindowType): Promise; @@ -559,7 +561,7 @@ declare namespace window { * @param path path Path of the page to which the content will be loaded * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 8 + * @since 9 */ loadContent(path: string, storage: ContentStorage, callback: AsyncCallback): void; @@ -570,16 +572,24 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ - loadContent(path: string, storage?: ContentStorage): Promise; + loadContent(path: string, storage: ContentStorage): Promise; /** * Loads content - * @param path path of the page to which the content will be loaded2 + * @param path path of the page to which the content will be loaded * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ loadContent(path: string, callback: AsyncCallback): void; + /** + * Loads content + * @param path path of the page to which the content will be loaded + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 7 + */ + loadContent(path: string): Promise; + /** * Checks whether the window is displayed * @syscap SystemCapability.WindowManager.WindowManager.Core -- Gitee