diff --git a/en/application-dev/reference/apis/js-apis-system-mediaquery.md b/en/application-dev/reference/apis/js-apis-system-mediaquery.md index 78b8807adbcb9456f5515fe926ccfbdd4ba3ba44..f2057a86685a5d212e84caf27e69468b8169c267 100644 --- a/en/application-dev/reference/apis/js-apis-system-mediaquery.md +++ b/en/application-dev/reference/apis/js-apis-system-mediaquery.md @@ -2,7 +2,9 @@ > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** -> The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> +> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.mediaquery`](js-apis-mediaquery.md) instead. +> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -23,14 +25,14 @@ Creates a **MediaQueryList** object based on the query condition. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| condition | string | Yes| Query condition.| +| Name | Type | Mandatory | Description | +| --------- | ------ | ---- | -------- | +| condition | string | Yes | Query condition.| **Return value** -| Type| Description| -| -------- | -------- | +| Type | Description | +| -------------- | ---------------------------------------- | | MediaQueryList | Attributes of the **MediaQueryList** object created. For details, see **MediaQueryList** attributes.| **Example** @@ -49,9 +51,9 @@ Defines a media query event. **System capability**: SystemCapability.ArkUI.ArkUI.Full -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| matches | boolean | Yes| Matching result.| +| Name | Type | Mandatory | Description | +| ------- | ------- | ---- | ----- | +| matches | boolean | Yes | Matching result.| ## MediaQueryList @@ -61,10 +63,10 @@ Defines a media query list. **System capability**: SystemCapability.ArkUI.ArkUI.Full -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| media | string | No| Serialized media query condition. This parameter is read-only.| -| matches | boolean | Yes| Matching result.| +| Name | Type | Mandatory | Description | +| ------- | ------- | ---- | ----------------- | +| media | string | No | Serialized media query condition. This parameter is read-only.| +| matches | boolean | Yes | Matching result. | ### onchange @@ -76,9 +78,9 @@ Called when the **matches** value changes. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| matches | boolean | Yes| New **matches** value.| +| Name | Type | Mandatory | Description | +| ------- | ------- | ---- | -------------- | +| matches | boolean | Yes | New **matches** value.| ### MediaQueryList.addListener @@ -91,9 +93,9 @@ Adds a listener for this **MediaQueryList** object. The listener must be added b **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | (event: MediaQueryEvent) => void | Yes| Callback invoked when the matching condition changes.| +| Name | Type | Mandatory | Description | +| -------- | -------------------------------- | ---- | -------------- | +| callback | (event: MediaQueryEvent) => void | Yes | Callback invoked when the matching condition changes.| **Example** @@ -112,9 +114,9 @@ Removes the listener for this **MediaQueryList** object. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | (event: MediaQueryEvent) => void) | Yes| Callback invoked when the matching condition changes.| +| Name | Type | Mandatory | Description | +| -------- | --------------------------------- | ---- | -------------- | +| callback | (event: MediaQueryEvent) => void) | Yes | Callback invoked when the matching condition changes.| **Example**