diff --git a/api/@ohos.arkui.uiExtension.d.ts b/api/@ohos.arkui.uiExtension.d.ts index 43440c5094b107c3a9a357b2a9b95cd72d0948dc..835c68b74ba58785b128eb9e4797ae3aadb5480c 100644 --- a/api/@ohos.arkui.uiExtension.d.ts +++ b/api/@ohos.arkui.uiExtension.d.ts @@ -88,10 +88,12 @@ declare namespace uiExtension { off(type: 'avoidAreaChange', callback?: Callback): void; /** - * Subscribes to the window size change event of the host application. + * Subscribes to the component (EmbeddedComponent or UIExtensionComponent) size change event. * - * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. + * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', + * indicating the component (EmbeddedComponent or UIExtensionComponent) size change event. + * @param { Callback } callback - Callback used to return the component (EmbeddedComponent or + * UIExtensionComponent) size. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -103,10 +105,12 @@ declare namespace uiExtension { on(type: 'windowSizeChange', callback: Callback): void; /** - * Unsubscribes from the window size change event of the host application. + * Unsubscribes from the component (EmbeddedComponent or UIExtensionComponent) size change event. * - * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. + * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', + * indicating the component (EmbeddedComponent or UIExtensionComponent) size change event. + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. diff --git a/api/@ohos.uiExtensionHost.d.ts b/api/@ohos.uiExtensionHost.d.ts index 12b73d66a13f54ef5433dda6a6e3ba6cf43b5c6a..bf10397911368e14d294d67cece53f947176e827 100644 --- a/api/@ohos.uiExtensionHost.d.ts +++ b/api/@ohos.uiExtensionHost.d.ts @@ -82,10 +82,12 @@ declare namespace uiExtensionHost { off(type: 'avoidAreaChange', callback?: Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }>): void; /** - * Register the callback of windowSizeChange + * Subscribes to the component (EmbeddedComponent or UIExtensionComponent) size change event. * - * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. + * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', + * indicating the component (EmbeddedComponent or UIExtensionComponent) size change event. + * @param { Callback } callback - Callback used to return the component (EmbeddedComponent or + * UIExtensionComponent) size. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -97,10 +99,12 @@ declare namespace uiExtensionHost { on(type: 'windowSizeChange', callback: Callback): void; /** - * Unregister the callback of windowSizeChange + * Unsubscribes from the component (EmbeddedComponent or UIExtensionComponent) size change event. * - * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. + * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', + * indicating the component (EmbeddedComponent or UIExtensionComponent) size change event. + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types.