From 4bcad5e070fe781ac86080b54be2d9a2d5341b80 Mon Sep 17 00:00:00 2001 From: leafly2021 Date: Mon, 7 Mar 2022 20:16:02 +0800 Subject: [PATCH] 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 f75000180e..ef85ec277a 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -279,6 +279,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; @@ -287,6 +288,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; @@ -560,7 +562,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; @@ -571,16 +573,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