diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 69c33f7bf3bda1bf22aea6a8deabeccf57431315..0609aa55d67b64596fc4bd31bd26ad6e9e9338ae 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