diff --git a/en/application-dev/ability/stage-formextension.md b/en/application-dev/ability/stage-formextension.md
index 3da3199ba3a5dce4b0c99338551af82ac0f291c4..2cc86ac811044eb525a9e1260f577971525f82c3 100644
--- a/en/application-dev/ability/stage-formextension.md
+++ b/en/application-dev/ability/stage-formextension.md
@@ -9,13 +9,19 @@ A widget displays brief information about an application on the UI of another ap
Basic concepts:
- Widget provider
+
The widget provider is an atomic service that provides the content to be displayed. It controls the display content, component layout, and component click events of a widget.
+
- Widget host
+
The widget host is an application that displays the widget content and controls the position where the widget is displayed in the host application.
+
- Widget Manager
+
The Widget Manager is a resident agent that manages widgets added to the system and provides functions such as periodic widget update.
>  **NOTE**
+>
> The widget host and provider do not keep running all the time. The Widget Manager starts the widget provider to obtain widget information when a widget is added, deleted, or updated.
You only need to develop widget content as the widget provider. The system automatically handles the work done by the widget host and Widget Manager.
@@ -244,13 +250,14 @@ You should override **onDestroy** to delete widget data.
}
```
-For details about the persistence method, see [Lightweight Data Store Development](../database/database-preference-guidelines.md).
+For details about the persistence method, see [Lightweight Data Store Development](../database/database-storage-guidelines.md).
Note that the **Want** passed by the widget host to the widget provider contains a temporary flag, indicating whether the requested widget is a temporary one.
-Normal widget: a widget that will be persistently used by the widget host
+- Normal widget: a widget that will be persistently used by the widget host
+
+- Temporary widget: a widget that is temporarily used by the widget host
-Temporary widget: a widget that is temporarily used by the widget host
Data of a temporary widget is not persistently stored. If the widget framework is killed and restarted, data of a temporary widget will be deleted. However, the widget provider is not notified of which widget is deleted, and still keeps the data. Therefore, the widget provider should implement data clearing. In addition, the widget host may convert a temporary widget into a normal one. If the conversion is successful, the widget provider should process the widget ID and store the data persistently. This prevents the widget provider from deleting persistent data when clearing temporary widgets.
@@ -258,6 +265,7 @@ Data of a temporary widget is not persistently stored. If the widget framework i
You can use HML, CSS, and JSON to develop the UI page for a JavaScript-programmed widget.
>  **NOTE**
+>
> Currently, only the JavaScript-based web-like development paradigm can be used to develop the widget UI.
- hml:
diff --git a/en/application-dev/reference/apis/js-apis-application-context.md b/en/application-dev/reference/apis/js-apis-application-context.md
index 4b58792502051c4046f3000d006a1228c1336704..635df95894dc0b2148aefc98ea7c4eb8a163b517 100644
--- a/en/application-dev/reference/apis/js-apis-application-context.md
+++ b/en/application-dev/reference/apis/js-apis-application-context.md
@@ -1,6 +1,7 @@
# Context
>  **NOTE**
+>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
@@ -17,18 +18,18 @@ You must extend **AbilityContext** to implement this module.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
- | Name| Type| Readable| Writable| Description|
+| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
-| resourceManager | ResourceManager | Yes| No| **ResourceManager** object.|
-| applicationInfo | ApplicationInfo | Yes| No| Information about the application.|
-| cacheDir | string | Yes| No| Cache directory of the application on the internal storage.|
-| tempDir | string | Yes| No| Temporary file directory of the application.|
-| filesDir | string | Yes| No| File directory of the application on the internal storage.|
-| databaseDir | string | Yes| No| Storage directory of local data.|
-| storageDir | string | Yes| No| Storage directory of lightweight data.|
-| bundleCodeDir | string | Yes| No| Application installation path.|
-| distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.|
-| eventHub | [EventHub](js-apis-eventhub.md) | Yes| No| Event hub information.|
+| resourceManager | ResourceManager | Yes| No| **ResourceManager** object.|
+| applicationInfo | ApplicationInfo | Yes| No| Information about the application.|
+| cacheDir | string | Yes| No| Cache directory of the application on the internal storage.|
+| tempDir | string | Yes| No| Temporary file directory of the application.|
+| filesDir | string | Yes| No| File directory of the application on the internal storage.|
+| databaseDir | string | Yes| No| Storage directory of local data.|
+| storageDir | string | Yes| No| Storage directory of lightweight data.|
+| bundleCodeDir | string | Yes| No| Application installation path.|
+| distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.|
+| eventHub | [EventHub](js-apis-eventhub.md) | Yes| No| Event hub information.|
## Context.createBundleContext
@@ -41,15 +42,15 @@ Creates an application context.
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | bundleName | string | Yes| Application bundle name.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| bundleName | string | Yes| Application bundle name.|
**Return value**
- | Type| Description|
- | -------- | -------- |
- | Context | Context of the application created.|
+| Type| Description|
+| -------- | -------- |
+| Context | Context of the application created.|
**Example**
@@ -69,9 +70,9 @@ Obtains the context of this application.
**Return value**
- | Type| Description|
- | -------- | -------- |
- | Context | Context obtained.|
+| Type| Description|
+| -------- | -------- |
+| Context | Context obtained.|
**Example**
diff --git a/en/application-dev/reference/apis/js-apis-formextensioncontext.md b/en/application-dev/reference/apis/js-apis-formextensioncontext.md
index faa3bd6c6f82018ca61c9ba1f008dbc1e72dae9f..c2a5e3f458fbefc83107345156f289a81b529fd2 100644
--- a/en/application-dev/reference/apis/js-apis-formextensioncontext.md
+++ b/en/application-dev/reference/apis/js-apis-formextensioncontext.md
@@ -1,6 +1,6 @@
# FormExtensionContext
->  **NOTE**
+>  **NOTE**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Implements the context that provides the capabilities and APIs of **FormExtension**. This class is inherited from **ExtensionContext**.
@@ -15,11 +15,11 @@ Updates a widget. This method uses a callback to return the result.
**Parameters**
- | Name | Type | Mandatory| Description |
- | --------------- | ------------------------------------------------------------ | ---- | -------------------------------------- |
- | formId | string | Yes | ID of the widget that requests to be updated. |
- | formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. |
- | callback | AsyncCallback\ | Yes | Callback used to return the result indicating whether the method is successfully called.|
+| Name | Type | Mandatory| Description |
+| --------------- | ------------------------------------------------------------ | ---- | -------------------------------------- |
+| formId | string | Yes | ID of the widget that requests to be updated. |
+| formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result indicating whether the method is successfully called.|
**Example**
@@ -40,16 +40,16 @@ Updates a widget. This method uses a promise to return the result.
**Parameters**
- | Name | Type | Mandatory| Description |
- | --------------- | ------------------------------------------------------------ | ---- | ------------------ |
- | formId | string | Yes | ID of the widget that requests to be updated.|
- | formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. |
+| Name | Type | Mandatory| Description |
+| --------------- | ------------------------------------------------------------ | ---- | ------------------ |
+| formId | string | Yes | ID of the widget that requests to be updated.|
+| formBindingData | [formBindingData.FormBindingData](js-apis-formbindingdata.md#formbindingdata) | Yes | New data of the widget. |
**Return value**
- | Type | Description |
- | -------------- | --------------------------------- |
- | Promise\ | Promise returned with the result indicating whether the method is successfully called.|
+| Type | Description |
+| -------------- | --------------------------------- |
+| Promise\ | Promise returned with the result indicating whether the method is successfully called.|
**Example**
diff --git a/en/application-dev/reference/apis/js-apis-service-extension-context.md b/en/application-dev/reference/apis/js-apis-service-extension-context.md
index 0c6b7c6749e3a7bab2d40fc730742dd3daef9f05..f8152d89445f0ef226c3949b4078a30ddf520972 100644
--- a/en/application-dev/reference/apis/js-apis-service-extension-context.md
+++ b/en/application-dev/reference/apis/js-apis-service-extension-context.md
@@ -1,6 +1,6 @@
# ServiceExtensionContext
->  **NOTE**
+>  **NOTE**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
@@ -17,10 +17,10 @@ Starts an ability. This API uses a callback to return the result.
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to start, such as the ability name and bundle name.|
- | callback | AsyncCallback<void> | No| Callback used to return the result indicating whether the API is successfully called.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to start, such as the ability name and bundle name.|
+| callback | AsyncCallback<void> | No| Callback used to return the result indicating whether the API is successfully called.|
**Example**
@@ -45,15 +45,15 @@ Starts an ability. This API uses a promise to return the result.
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to start, such as the ability name and bundle name.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to start, such as the ability name and bundle name.|
**Return value**
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
+| Type| Description|
+| -------- | -------- |
+| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
**Example**
@@ -80,9 +80,9 @@ Terminates this ability. This API uses a callback to return the result.
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | callback | AsyncCallback<void> | No| Callback used to return the result indicating whether the API is successfully called.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| callback | AsyncCallback<void> | No| Callback used to return the result indicating whether the API is successfully called.|
**Example**
@@ -103,9 +103,9 @@ Terminates this ability. This API uses a promise to return the result.
**Return value**
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
+| Type| Description|
+| -------- | -------- |
+| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
**Example**
@@ -128,16 +128,16 @@ Connects this ability to a Service ability.
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to connect to, such as the ability name and bundle name.|
- | options | [ConnectOptions](#connectoptions) | Yes| Callback used to return the information indicating that the connection is successful, interrupted, or failed.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to connect to, such as the ability name and bundle name.|
+| options | [ConnectOptions](#connectoptions) | Yes| Callback used to return the information indicating that the connection is successful, interrupted, or failed.|
**Return value**
- | Type| Description|
- | -------- | -------- |
- | number | A number, based on which the connection will be interrupted.|
+| Type| Description|
+| -------- | -------- |
+| number | A number, based on which the connection will be interrupted.|
**Example**
@@ -165,10 +165,10 @@ Disconnects this ability from the Service ability. This API uses a callback to r
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | connection | number | Yes| Number returned after **connectAbility** is called.|
- | callback | AsyncCallback<void> | No| Callback used to return the result indicating whether the API is successfully called.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| connection | number | Yes| Number returned after **connectAbility** is called.|
+| callback | AsyncCallback<void> | No| Callback used to return the result indicating whether the API is successfully called.|
**Example**
@@ -189,16 +189,16 @@ Disconnects this ability from the Service ability. This API uses a promise to re
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | connection | number | Yes| Number returned after **connectAbility** is called.|
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| connection | number | Yes| Number returned after **connectAbility** is called.|
**Return value**
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
-
+| Type| Description|
+| -------- | -------- |
+| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
+
**Example**
```js
@@ -216,8 +216,8 @@ Defines the **ConnectOptions** data structure.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
-| Name| Description|
+| Name| Description|
| -------- | -------- |
-| onConnect(elementName:ElementName, remote:IRemoteObject) | Called when this ability is connected to a Service ability.|
-| onDisconnect(elementName:ElementName) | Called when the peer service is abnormal or killed.|
-| onFailed(code: number) | Called when the connection fails.|
+| onConnect(elementName:ElementName, remote:IRemoteObject) | Called when this ability is connected to a Service ability.|
+| onDisconnect(elementName:ElementName) | Called when the peer service is abnormal or killed.|
+| onFailed(code: number) | Called when the connection fails.|