diff --git a/en/application-dev/reference/apis-form-kit/js-apis-app-form-formExtensionAbility.md b/en/application-dev/reference/apis-form-kit/js-apis-app-form-formExtensionAbility.md index 1a668743cbc40488c6c18a9f5154827593a5f15e..69d626f4cbbd24119bc22c2d3d7b4e4e64bb335f 100644 --- a/en/application-dev/reference/apis-form-kit/js-apis-app-form-formExtensionAbility.md +++ b/en/application-dev/reference/apis-form-kit/js-apis-app-form-formExtensionAbility.md @@ -41,7 +41,7 @@ Widget extension class. It provides APIs to notify the widget provider that a wi onAddForm(want: Want): formBindingData.FormBindingData -Called to notify the widget provider that a **Form** instance (widget) is being created. +Called to notify the widget provider that a widget is being created. **Model restriction**: This API can be used only in the stage model. @@ -53,7 +53,7 @@ Called to notify the widget provider that a **Form** instance (widget) is being | Name| Type | Mandatory| Description | | ------ | -------------------------------------- | ---- | ------------------------------------------------------------ | -| want | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | Yes | Want information related to the FormExtensionAbility, including the widget ID, name, and style. The information must be managed as persistent data to facilitate subsequent widget update and deletion.| +| want | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | Yes | Want information of the widget. You can set the **parameters** field to one or more values enumerated in [widget parameters](./js-apis-app-form-formInfo.md#formparam), such as widget ID, widget name, and widget style. The information must be managed as persistent data to facilitate subsequent widget update and deletion.| **Return value** @@ -177,7 +177,7 @@ This API is valid only for system applications when **formVisibleNotify** is set import { formBindingData, FormExtensionAbility, formProvider } from '@kit.FormKit'; import { BusinessError } from '@kit.BasicServicesKit'; -// According to the ArkTS specification, **Object.keys** and **for..in...** cannot be used in .ets files to obtain the key value of an object. Use the user-defined function **getObjKeys** instead. +// According to the ArkTS specification, Object.keys and for..in... cannot be used in .ets files to obtain the key value of an object. Use the user-defined function getObjKeys instead. // Extract this function to a .ts file and export it. Import this function to the required .ets file before using it. function getObjKeys(obj: Object): string[] { let keys = Object.keys(obj); @@ -242,7 +242,7 @@ export default class MyFormExtensionAbility extends FormExtensionAbility { onRemoveForm(formId: string): void -Called to notify the widget provider that a **Form** instance (widget) is being destroyed. +Called to notify the widget provider that a widget is being destroyed. **Model restriction**: This API can be used only in the stage model. @@ -272,8 +272,8 @@ export default class MyFormExtensionAbility extends FormExtensionAbility { onConfigurationUpdate(newConfig: Configuration): void -Called when the configuration of the environment where the FormExtensionAbility is running is updated. -This lifecycle callback is triggered only when the configuration is updated while the FormExtensionAbility is alive. If no operation is performed within 10 seconds after a **FormExtensionAbility** instance is created, the instance will be deleted. +Called when system configuration items change. + The **onConfigurationUpdate** callback is triggered only when the FormExtensionAbility is alive. If no operation is performed within 10 seconds after a **FormExtensionAbility** instance is created, the instance will be deleted. **Model restriction**: This API can be used only in the stage model. @@ -320,6 +320,12 @@ Called to notify the widget provider that the widget host is requesting the widg | -------- | -------- | -------- | -------- | | want | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | Yes| Description of the widget state, including the bundle name, ability name, module name, widget name, and widget dimension.| +**Return value** + +| Type | Description | +| ------------------------------------------------------------ | ----------------------------------------------------------- | +| [formInfo.FormState](js-apis-app-form-formInfo.md#formstate) | Enumerated values of the current widget status.| + **Example** ```ts