diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index f75000180e1c3387cad4f1b81c7970bfd1f1b967..ef85ec277a87c0a7c668b3e064577f28cb476d87 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