未验证 提交 410478d8 编写于 作者: O openharmony_ci 提交者: Gitee

!11312 fix featureAbility doc issue

Merge pull request !11312 from laoyitong/1108
......@@ -52,6 +52,9 @@ featureAbility.startAbility(
uri: ""
},
},
(err, data) => {
console.info("err: " + JSON.stringify(err) + "data: " + JSON.stringify(data))
}
);
```
......@@ -268,6 +271,9 @@ featureAbility.terminateSelfWithResult(
}
},
},
(err, data) => {
console.info("err: " + JSON.stringify(err) + "data: " + JSON.stringify(data))
}
);
```
......@@ -345,7 +351,11 @@ hasWindowFocus(callback: AsyncCallback\<boolean>): void
```javascript
import featureAbility from '@ohos.ability.featureAbility';
featureAbility.hasWindowFocus()
featureAbility.hasWindowFocus(
(err, data) => {
console.info("err: " + JSON.stringify(err) + "data: " + JSON.stringify(data))
}
)
```
## featureAbility.hasWindowFocus<sup>7+<sup>
......@@ -389,7 +399,11 @@ getWant(callback: AsyncCallback\<Want>): void
```javascript
import featureAbility from '@ohos.ability.featureAbility';
featureAbility.getWant()
featureAbility.getWant(
(err, data) => {
console.info("err: " + JSON.stringify(err) + "data: " + JSON.stringify(data))
}
)
```
## featureAbility.getWant
......@@ -455,7 +469,11 @@ terminateSelf(callback: AsyncCallback\<void>): void
```javascript
import featureAbility from '@ohos.ability.featureAbility';
featureAbility.terminateSelf()
featureAbility.terminateSelf(
(err, data) => {
console.info("err: " + JSON.stringify(err) + "data: " + JSON.stringify(data))
}
)
```
## featureAbility.terminateSelf<sup>7+</sup>
......@@ -583,7 +601,7 @@ var connId = featureAbility.connectAbility(
},
);
var result = featureAbility.disconnectAbility(connId,
(error,data) => {
(error, data) => {
console.log('featureAbilityTest DisConnectJsSameBundleName result errCode : ' + error.code + " data: " + data)
},
);
......@@ -660,7 +678,11 @@ getWindow(callback: AsyncCallback\<window.Window>): void
**示例:**
```javascript
featureAbility.getWindow()
featureAbility.getWindow(
(err, data) => {
console.info("err: " + JSON.stringify(err) + "data: " + JSON.stringify(data))
}
)
```
## featureAbility.getWindow<sup>7+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册