diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityManager.md
index 50d07b38f6e79fb87b32d0dc843780754aeb8f2a..c35a9ee3fa5beeae970bf3e86145b4472122b120 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityManager.md
@@ -64,7 +64,7 @@ const config = {
language: 'Zh-Hans', // 简体中文
colorMode: COLOR_MODE_LIGHT, // 浅色模式
direction: DIRECTION_VERTICAL, // 垂直方向
- screenDensity: SCREEN_DENSITY_SDPI, // 屏幕分辨率为'sdpi'
+ screenDensity: SCREEN_DENSITY_SDPI, // 屏幕像素密度为'sdpi'
displayId: 1, // 应用在Id为1的物理屏上显示
hasPointerDevice: true, // 指针类型设备已连接
};
@@ -76,7 +76,7 @@ try {
} else {
console.log('updateConfiguration success.');
}
- })
+ });
} catch (paramError) {
console.log('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}');
}
@@ -121,7 +121,7 @@ const config = {
language: 'Zh-Hans', // 简体中文
colorMode: COLOR_MODE_LIGHT, // 浅色模式
direction: DIRECTION_VERTICAL, // 垂直方向
- screenDensity: SCREEN_DENSITY_SDPI, // 屏幕分辨率为'sdpi'
+ screenDensity: SCREEN_DENSITY_SDPI, // 屏幕像素密度为'sdpi'
displayId: 1, // 应用在Id为1的物理屏上显示
hasPointerDevice: true, // 指针类型设备已连接
};
@@ -131,7 +131,7 @@ try {
console.log('updateConfiguration success.');
}).catch((err) => {
console.log('updateConfiguration fail, err: ${JSON.stringify(err)}');
- })
+ });
} catch (paramError) {
console.log('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}');
}
@@ -306,7 +306,7 @@ try {
console.log('getExtensionRunningInfos success, data: ${JSON.stringify(data)}');
}).catch((err) => {
console.log('getExtensionRunningInfos fail, err: ${JSON.stringify(err)}');
- })
+ });
} catch (paramError) {
console.log('error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}');
}
@@ -379,5 +379,5 @@ abilityManager.getTopAbility().then((data) => {
console.log('getTopAbility success, data: ${JSON.stringify(data)}');
}).catch((err) => {
console.log('getTopAbility fail, err: ${JSON.stringify(err)}');
-})
+});
```
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md
index a86f63ea8273f81e7062d4753acd65c8855790a3..1dc36057594e97f6cf92be2f3736ca7442d3eb22 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md
@@ -45,7 +45,7 @@ appManager.isRunningInStabilityTest((err, flag) => {
} else {
console.log('The result of isRunningInStabilityTest is: ${JSON.stringify(flag)}');
}
-})
+});
```
@@ -151,7 +151,7 @@ appManager.isRamConstrainedDevice((err, data) => {
} else {
console.log('The result of isRamConstrainedDevice is: ${JSON.stringify(data)}');
}
-})
+});
```
## appManager.getAppMemorySize
@@ -221,7 +221,7 @@ appManager.getAppMemorySize((err, data) => {
} else {
console.log('The size of app memory is: ${JSON.stringify(data)}');
}
-})
+});
```
## appManager.getRunningProcessInformation
@@ -295,7 +295,7 @@ appManager.getRunningProcessInformation((err, data) => {
} else {
console.log('The process running information is: ${JSON.stringify(data)}');
}
-})
+});
```
## appManager.on
@@ -352,7 +352,7 @@ let applicationStateObserver = {
onProcessStateChanged(processData) {
console.log(`[appManager] onProcessStateChanged: ${JSON.stringify(processData)}`);
}
-}
+};
try {
const observerId = appManager.on('applicationState', applicationStateObserver);
console.log(`[appManager] observerCode: ${observerId}`);
@@ -416,7 +416,7 @@ let applicationStateObserver = {
onProcessStateChanged(processData) {
console.log(`[appManager] onProcessStateChanged: ${JSON.stringify(processData)}`);
}
-}
+};
let bundleNameList = ['bundleName1', 'bundleName2'];
try {
const observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList);
@@ -478,7 +478,7 @@ let applicationStateObserver = {
onProcessStateChanged(processData) {
console.log(`[appManager] onProcessStateChanged: ${JSON.stringify(processData)}`);
}
-}
+};
let bundleNameList = ['bundleName1', 'bundleName2'];
try {
observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList);
@@ -559,7 +559,7 @@ let applicationStateObserver = {
onProcessStateChanged(processData) {
console.log(`[appManager] onProcessStateChanged: ${JSON.stringify(processData)}`);
}
-}
+};
let bundleNameList = ['bundleName1', 'bundleName2'];
try {
observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList);
@@ -574,7 +574,7 @@ try {
console.log('unregisterApplicationStateObserver success, data: ${JSON.stringify(data)}');
}).catch((err) => {
console.log('unregisterApplicationStateObserver fail, err: ${JSON.stringify(err)}');
- })
+ });
} catch (paramError) {
console.log('error: ${paramError.code}, ${paramError.message}');
}
@@ -660,7 +660,7 @@ appManager.getForegroundApplications().then((data) => {
console.log('getForegroundApplications success, data: ${JSON.stringify(data)}');
}).catch((err) => {
console.log('getForegroundApplications fail, err: ${JSON.stringify(err)}');
-})
+});
```
## appManager.killProcessWithAccount
@@ -702,7 +702,7 @@ try {
console.log('killProcessWithAccount success');
}).catch((err) => {
console.error('killProcessWithAccount fail, err: ${JSON.stringify(err)}');
- })
+ });
} catch (paramError) {
console.error('error: ${paramError.code}, ${paramError.message}');
}
@@ -844,7 +844,7 @@ try {
console.log('killProcessesByBundleName success.');
}).catch((err) => {
console.log('killProcessesByBundleName fail, err: ${JSON.stringify(err)}');
- })
+ });
} catch (paramError) {
console.log('error: ${paramError.code}, ${paramError.message}');
}
@@ -940,7 +940,7 @@ try {
console.log('clearUpApplicationData success.');
}).catch((err) => {
console.log('clearUpApplicationData fail, err: ${JSON.stringify(err)}');
- })
+ });
} catch (paramError) {
console.log('error: ${paramError.code}, ${paramError.message}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-configuration.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-configuration.md
index c761bfae83d974dd91b3f67aa2658d35bbb367b7..315454e13e366326deabc0950dfcc4f676e82ef7 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-configuration.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-configuration.md
@@ -13,7 +13,7 @@
| language | string | 是 | 是 | 表示应用程序的当前语言,例如“zh"。 |
| colorMode | [ColorMode](js-apis-app-ability-configurationConstant.md#configurationconstantcolormode) | 是 | 是 | 表示深浅色模式,默认为浅色。取值范围:
- COLOR_MODE_NOT_SET:未设置
- COLOR_MODE_LIGHT:浅色模式
- COLOR_MODE_DARK:深色模式 |
| direction | [Direction](js-apis-app-ability-configurationConstant.md#configurationconstantdirection) | 是 | 否 | 表示屏幕方向,取值范围:
- DIRECTION_NOT_SET:未设置
- DIRECTION_HORIZONTAL:水平方向
- DIRECTION_VERTICAL:垂直方向 |
-| screenDensity | [ScreenDensity](js-apis-app-ability-configurationConstant.md#configurationconstantscreendensity) | 是 | 否 | 表示屏幕分辨率,取值范围:
- SCREEN_DENSITY_NOT_SET:未设置
- SCREEN_DENSITY_SDPI:120
- SCREEN_DENSITY_MDPI:160
- SCREEN_DENSITY_LDPI:240
- SCREEN_DENSITY_XLDPI:320
- SCREEN_DENSITY_XXLDPI:480
- SCREEN_DENSITY_XXXLDPI:640 |
+| screenDensity | [ScreenDensity](js-apis-app-ability-configurationConstant.md#configurationconstantscreendensity) | 是 | 否 | 表示屏幕像素密度,取值范围:
- SCREEN_DENSITY_NOT_SET:未设置
- SCREEN_DENSITY_SDPI:120
- SCREEN_DENSITY_MDPI:160
- SCREEN_DENSITY_LDPI:240
- SCREEN_DENSITY_XLDPI:320
- SCREEN_DENSITY_XXLDPI:480
- SCREEN_DENSITY_XXXLDPI:640 |
| displayId | number | 是 | 否 | 表示应用所在的物理屏幕ID。 |
| hasPointerDevice | boolean | 是 | 否 | 指示指针类型设备是否已连接,如键鼠、触控板等。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-configurationConstant.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-configurationConstant.md
index d86dd14daeb873b1259587500ce6f4378a543c7e..12dd3f68eb221f7f0862f3dfe349707ba380e8d3 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-configurationConstant.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-configurationConstant.md
@@ -46,10 +46,10 @@ import ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant';
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
-| SCREEN_DENSITY_NOT_SET | 0 | 未设置屏幕分辨率。 |
-| SCREEN_DENSITY_SDPI | 120 | 屏幕分辨率为'sdpi'。 |
-| SCREEN_DENSITY_MDPI | 160 | 屏幕分辨率为'mdpi'。 |
-| SCREEN_DENSITY_LDPI | 240 | 屏幕分辨率为'ldpi'。 |
-| SCREEN_DENSITY_XLDPI | 320 | 屏幕分辨率为'xldpi'。 |
-| SCREEN_DENSITY_XXLDPI | 480 | 屏幕分辨率为'xxldpi'。 |
-| SCREEN_DENSITY_XXXLDPI | 640 | 屏幕分辨率为'xxxldpi'。 |
+| SCREEN_DENSITY_NOT_SET | 0 | 未设置屏幕像素密度。 |
+| SCREEN_DENSITY_SDPI | 120 | 屏幕像素密度为'sdpi'。 |
+| SCREEN_DENSITY_MDPI | 160 | 屏幕像素密度为'mdpi'。 |
+| SCREEN_DENSITY_LDPI | 240 | 屏幕像素密度为'ldpi'。 |
+| SCREEN_DENSITY_XLDPI | 320 | 屏幕像素密度为'xldpi'。 |
+| SCREEN_DENSITY_XXLDPI | 480 | 屏幕像素密度为'xxldpi'。 |
+| SCREEN_DENSITY_XXXLDPI | 640 | 屏幕像素密度为'xxxldpi'。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-environmentCallback.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-environmentCallback.md
index 22add0f3420542925eee3783d9852d01ba383abb..f314047fe0816aa0b02957301b6b25e37e98adef 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-environmentCallback.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-environmentCallback.md
@@ -63,7 +63,7 @@ export default class MyAbility extends UIAbility {
onMemoryLevel(level){
console.log('onMemoryLevel level: ${JSON.stringify(level)}');
}
- }
+ };
// 1.获取applicationContext
let applicationContext = globalThis.applicationContext;
// 2.通过applicationContext注册监听应用内生命周期
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md
index ed1a05d0ca51e0b4cb336a84afe7ce369a6c73f9..c9842728f15926129c61f42625ba37ede65438a2 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md
@@ -39,7 +39,7 @@ let observer = {
onUnhandledException(errorMsg) {
console.log('onUnhandledException, errorMsg: ', errorMsg);
}
-}
+};
let observerId = -1;
try {
observerId = errorManager.on('error', observer);
@@ -113,7 +113,7 @@ try {
})
.catch((err) => {
console.log('----------- unregisterErrorObserver fail ----------', err);
- })
+ });
} catch (paramError) {
console.log('error: ${paramError.code}, ${paramError.message}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md
index a4db030b7f785ae04950cbeb79d244170478ceb6..65df2f9e1b4176c2efc5f0092fc9631ee6e8d87d 100755
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md
@@ -47,13 +47,13 @@ import missionManager from '@ohos.app.ability.missionManager';
import UIAbility from '@ohos.app.ability.UIAbility';
let listener = {
- onMissionCreated: function (mission) {console.log('--------onMissionCreated-------')},
- onMissionDestroyed: function (mission) {console.log('--------onMissionDestroyed-------')},
- onMissionSnapshotChanged: function (mission) {console.log('--------onMissionSnapshotChanged-------')},
- onMissionMovedToFront: function (mission) {console.log('--------onMissionMovedToFront-------')},
- onMissionIconUpdated: function (mission, icon) {console.log('--------onMissionIconUpdated-------')},
- onMissionClosed: function (mission) {console.log('--------onMissionClosed-------')},
- onMissionLabelUpdated: function (mission) {console.log('--------onMissionLabelUpdated-------')}
+ onMissionCreated: function (mission) {console.log('--------onMissionCreated-------');},
+ onMissionDestroyed: function (mission) {console.log('--------onMissionDestroyed-------');},
+ onMissionSnapshotChanged: function (mission) {console.log('--------onMissionSnapshotChanged-------');},
+ onMissionMovedToFront: function (mission) {console.log('--------onMissionMovedToFront-------');},
+ onMissionIconUpdated: function (mission, icon) {console.log('--------onMissionIconUpdated-------');},
+ onMissionClosed: function (mission) {console.log('--------onMissionClosed-------');},
+ onMissionLabelUpdated: function (mission) {console.log('--------onMissionLabelUpdated-------');}
};
let listenerId = -1;
@@ -129,13 +129,13 @@ import missionManager from '@ohos.app.ability.missionManager';
import UIAbility from '@ohos.app.ability.UIAbility';
let listener = {
- onMissionCreated: function (mission) {console.log('--------onMissionCreated-------')},
- onMissionDestroyed: function (mission) {console.log('--------onMissionDestroyed-------')},
- onMissionSnapshotChanged: function (mission) {console.log('--------onMissionSnapshotChanged-------')},
- onMissionMovedToFront: function (mission) {console.log('--------onMissionMovedToFront-------')},
- onMissionIconUpdated: function (mission, icon) {console.log('--------onMissionIconUpdated-------')},
- onMissionClosed: function (mission) {console.log('--------onMissionClosed-------')},
- onMissionLabelUpdated: function (mission) {console.log('--------onMissionLabelUpdated-------')}
+ onMissionCreated: function (mission) {console.log('--------onMissionCreated-------');},
+ onMissionDestroyed: function (mission) {console.log('--------onMissionDestroyed-------');},
+ onMissionSnapshotChanged: function (mission) {console.log('--------onMissionSnapshotChanged-------');},
+ onMissionMovedToFront: function (mission) {console.log('--------onMissionMovedToFront-------');},
+ onMissionIconUpdated: function (mission, icon) {console.log('--------onMissionIconUpdated-------');},
+ onMissionClosed: function (mission) {console.log('--------onMissionClosed-------');},
+ onMissionLabelUpdated: function (mission) {console.log('--------onMissionLabelUpdated-------');}
};
let listenerId = -1;
@@ -216,13 +216,13 @@ import missionManager from '@ohos.app.ability.missionManager';
import UIAbility from '@ohos.app.ability.UIAbility';
let listener = {
- onMissionCreated: function (mission) {console.log('--------onMissionCreated-------')},
- onMissionDestroyed: function (mission) {console.log('--------onMissionDestroyed-------')},
- onMissionSnapshotChanged: function (mission) {console.log('--------onMissionSnapshotChanged-------')},
- onMissionMovedToFront: function (mission) {console.log('--------onMissionMovedToFront-------')},
- onMissionIconUpdated: function (mission, icon) {console.log('--------onMissionIconUpdated-------')},
- onMissionClosed: function (mission) {console.log('--------onMissionClosed-------')},
- onMissionLabelUpdated: function (mission) {console.log('--------onMissionLabelUpdated-------')}
+ onMissionCreated: function (mission) {console.log('--------onMissionCreated-------');},
+ onMissionDestroyed: function (mission) {console.log('--------onMissionDestroyed-------');},
+ onMissionSnapshotChanged: function (mission) {console.log('--------onMissionSnapshotChanged-------');},
+ onMissionMovedToFront: function (mission) {console.log('--------onMissionMovedToFront-------');},
+ onMissionIconUpdated: function (mission, icon) {console.log('--------onMissionIconUpdated-------');},
+ onMissionClosed: function (mission) {console.log('--------onMissionClosed-------');},
+ onMissionLabelUpdated: function (mission) {console.log('--------onMissionLabelUpdated-------');}
};
let listenerId = -1;
@@ -397,7 +397,7 @@ getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback<Arr
console.log('size = ${missions.length}');
console.log('missions = ${JSON.stringify(missions)}');
}
- })
+ });
} catch (paramError) {
console.log('error: ${paramError.code}, ${paramError.message}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
index a13ae2a2771ff0dd3c1f667735f2f6f1731275d0..a2e2cf84b15ab95b3d1121477e8ddfbb3e476a43 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
@@ -116,7 +116,7 @@ applyQuickFix(hapModuleQuickFixFiles: Array\): Promise\;
console.info(`applyQuickFix err: ${error}`);
});
} catch (paramError) {
- console.log('error: ${paramError.code}, ${paramError.message}‘);
+ console.log('error: ${paramError.code}, ${paramError.message}');
}
```
@@ -150,7 +150,7 @@ getApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback\{
console.info('getBundleName failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
- })
+ });
} catch(err){
console.info('getBundleName failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
}
@@ -604,7 +604,7 @@ function getWantAgentCallback(err, data) {
console.info('getUid ok! ${JSON.stringify(data)}');
}).catch((err)=>{
console.info('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
- })
+ });
} catch(err){
console.info('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
}
@@ -818,7 +818,7 @@ function getWantAgentCallback(err, data) {
console.info('getUid ok! ${JSON.stringify(data)}');
}).catch((err)=>{
console.info('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
- })
+ });
} catch(err){
console.info('getUid failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
}
@@ -1029,7 +1029,7 @@ function getWantAgentCallback(err, data) {
console.info('cancel ok!');
}).catch((err)=>{
console.info('cancel failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
- })
+ });
} catch(err){
console.info('cancel failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
}
@@ -1561,7 +1561,7 @@ function getWantAgentCallback(err, data) {
console.info('getOperationType ok! ${JSON.stringify(data)}');
}).catch((err)=>{
console.info('getOperationType failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
- })
+ });
} catch(err){
console.info('getOperationType failed! ${JSON.stringify(err.code)} ${JSON.stringify(err.message)}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-appManager.md b/zh-cn/application-dev/reference/apis/js-apis-application-appManager.md
index 59f33d6f6183cbef07f584ebbc751ad7443e749c..755821d2b1c4f073383748ec7188b393e17d78d6 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-appManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-appManager.md
@@ -32,7 +32,7 @@ static isRunningInStabilityTest(callback: AsyncCallback<boolean>): void
appManager.isRunningInStabilityTest((err, flag) => {
console.log('error: ${JSON.stringify(err)}');
console.log('The result of isRunningInStabilityTest is: ${JSON.stringify(flag)}');
- })
+ });
```
@@ -105,7 +105,7 @@ isRamConstrainedDevice(callback: AsyncCallback\): void;
appManager.isRamConstrainedDevice((err, data) => {
console.log('error: ${JSON.stringify(err)}');
console.log('The result of isRamConstrainedDevice is: ${JSON.stringify(data)}');
- })
+ });
```
## appManager.getAppMemorySize
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md b/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
index d4ca129f7566d15f73958c68f2bfb6ea8a5f2181..728d28d9ed23d8339f557481cb1508c7e5459732 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
@@ -17,7 +17,6 @@
**示例:**
```ts
-import hilog from '@ohos.hilog';
import UIAbility from '@ohos.app.ability.UIAbility';
import Window from '@ohos.window';
@@ -42,12 +41,10 @@ export default class EntryAbility extends UIAbility {
windowStage.loadContent('pages/index', (err, data) => {
if (err.code) {
- hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR);
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ console.error('failed to load the content, error: + ${JSON.stringify(err)}');
return;
}
- hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO);
- hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
+ console.info('Succeeded in loading the content, data: + ${JSON.stringify(data)}');
});
}
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-environmentCallback.md b/zh-cn/application-dev/reference/apis/js-apis-application-environmentCallback.md
index e64930969843f2ba3cd7e79a7141863511cf904e..71cab532ff8bacf67050c0dc61cd7ae4da456a29 100755
--- a/zh-cn/application-dev/reference/apis/js-apis-application-environmentCallback.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-environmentCallback.md
@@ -61,7 +61,7 @@ export default class EntryAbility extends UIAbility {
onMemoryLevel(level){
console.log('onMemoryLevel level: ${level}');
}
- }
+ };
// 1.获取applicationContext
let applicationContext = globalThis.applicationContext;
// 2.通过applicationContext注册监听应用内生命周期
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-missionManager.md b/zh-cn/application-dev/reference/apis/js-apis-application-missionManager.md
index 23672cd08b284bf2dd7eaeb20b095985478db606..1fb97c066708be870333fa3de6c9c03b05127bb6 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-missionManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-missionManager.md
@@ -93,7 +93,7 @@ unregisterMissionListener(listenerId: number, callback: AsyncCallback<void>
missionManager.unregisterMissionListener(listenerid, (error) => {
console.log('unregisterMissionListener');
- })
+ });
```
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-windowExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-application-windowExtensionAbility.md
index 5cbb5992d7b1f91df6b36618841af0bdd884b16b..a977546199a950cafb414d64a6fad24a5713480d 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-windowExtensionAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-windowExtensionAbility.md
@@ -101,9 +101,9 @@ export default class MyWindowExtensionAbility extends WindowExtensionAbility {
window.loadContent('WindowExtAbility/pages/index1').then(() => {
window.getProperties().then((pro) => {
console.log('WindowExtension pro: ${JSON.stringify(pro)}');
- })
+ });
window.show();
- })
+ });
}
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md
index 79c546be24f92987c53d27837a544751d0292040..06e0cc2f131cab7db6367a9a5cfa5f6802d02b27 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md
@@ -35,7 +35,7 @@ Want是对象间信息传递的载体, 可以用于应用组件间的信息传
this.context.startAbility(want, (error) => {
// 显式拉起Ability,通过bundleName、abilityName和moduleName可以唯一确定一个Ability
console.log('error.code = ${error.code}');
- })
+ });
```
- 传递FD(文件描述符)数据(在UIAbility对象中调用,其中示例中的context为UIAbility的上下文对象)
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md
index b64ef8e020eeaee323e2e7979f24fce9c69c3f33..2bc0d9bcbefc8f672a80e7b94f51d38264ef5090 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md
@@ -231,7 +231,7 @@ function onAbilityCreateCallback(data) {
let monitor = {
abilityName: 'abilityname',
onAbilityCreate: onAbilityCreateCallback
-}
+};
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.waitAbilityMonitor(monitor, timeout, (err : any, data : any) => {
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md
index 1231eba8fcff39de53f52deda07fa0399092334f..f8d9dc2f305c257ad75f4505d6ced5222c9bf006 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationStateObserver.md
@@ -34,6 +34,6 @@ let applicationStateObserver = {
onProcessStateChanged(processData) {
console.log('onProcessStateChanged onProcessStateChanged: ${JSON.stringify(processData)}');
}
-}
+};
let observerCode = appManager.registerApplicationStateObserver(applicationStateObserver);
```
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-missionSnapshot.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-missionSnapshot.md
index 79be17287e3f32293fa11574c428d075ade23ba5..9c8ddb1ee506c9b16f486fcd0068a57f4d86644a 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-missionSnapshot.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-missionSnapshot.md
@@ -42,8 +42,8 @@
// 执行正常业务
console.log('bundleName = ${snapshot.ability.bundleName}');
- })
- })
+ });
+ });
} catch (paramError) {
console.log('error: ${paramError.code}, ${paramError.message}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-processData.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-processData.md
index 911448dedfb10099b9cd22b40141c2b0910f2bfe..2911b0e31fc72b50844f78c37dbeb2e8d26ff2d9 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-processData.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-processData.md
@@ -39,6 +39,6 @@ let applicationStateObserver = {
console.log('onProcessStateChanged processData.isContinuousTask : ${JSON.stringify(processData.isContinuousTask)}');
console.log('onProcessStateChanged processData.isKeepAlive : ${JSON.stringify(processData.isKeepAlive)}');
}
-}
+};
let observerCode = appManager.registerApplicationStateObserver(applicationStateObserver);
```
\ No newline at end of file