提交 95d62a5e 编写于 作者: N njupthan

update d.ts file

Signed-off-by: Nnjupthan <hanhaibin@huawei.com>
上级 2da7be1c
......@@ -34,7 +34,7 @@ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): void
```js
var abilityDelegator;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......@@ -76,7 +76,7 @@ addAbilityMonitor(monitor: AbilityMonitor): Promise\<void>
```js
var abilityDelegator;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......@@ -113,7 +113,7 @@ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): v
```js
var abilityDelegator;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......@@ -155,7 +155,7 @@ removeAbilityMonitor(monitor: AbilityMonitor): Promise\<void>
```js
var abilityDelegator;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......@@ -192,7 +192,7 @@ waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<Ability>):
```js
var abilityDelegator;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......@@ -231,7 +231,7 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCall
var abilityDelegator;
var timeout = 100;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......@@ -274,7 +274,7 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise\<Ability>
```js
var abilityDelegator;
function onAbilityCreateCallback() {
function onAbilityCreateCallback(data) {
console.info("onAbilityCreateCallback");
}
......
......@@ -16,16 +16,15 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry
Ability监听器
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------------------- | -------- | ---- | ---- | ------------------------------------------------------------ |
| abilityName | string | 是 | 是 | 当前AbilityMonitor绑定的ability名称。 |
| onAbilityCreate | function | 是 | 是 | ability被启动初始化时的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| onAbilityForeground | function | 是 | 是 | ability状态变成前台时的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| onAbilityBackground | function | 是 | 是 | ability状态变成后台时的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| onAbilityDestroy | function | 是 | 是 | ability被销毁前的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| onWindowStageCreate | function | 是 | 是 | window stage被创建时的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| onWindowStageRestore | function | 是 | 是 | window stage被重载时的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| onWindowStageDestroy | function | 是 | 是 | window stage被销毁前的回调函数。<br/>不设置该属性则不能收到该生命周期回调。 |
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------------------------------------------------ | -------- | ---- | ---- | ------------------------------------------------------------ |
| abilityName | string | 是 | 是 | 当前AbilityMonitor绑定的ability名称<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onAbilityCreate?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | ability被启动初始化时的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onAbilityForeground?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | ability状态变成前台时的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onAbilityBackground?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | ability状态变成后台时的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onAbilityDestroy?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | ability被销毁前的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onWindowStageCreate?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | window stage被创建时的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onWindowStageRestore?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | window stage被重载时的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
| onWindowStageDestroy?:(data: [Ability](js-apis-application-ability.md#Ability)) | function | 是 | 是 | window stage被销毁前的回调函数<br/>不设置该属性则不能收到该生命周期回调<br/>**系统能力:** SystemCapability.Ability.AbilityRuntime.Core |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册