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

!10168 翻译完成:9952+9950+9996+9795+9831 多个API更新 (只涉及代码)

Merge pull request !10168 from wusongqing/TR9831
......@@ -78,7 +78,7 @@ export default class MyWindowExtensionAbility extends WindowExtensionAbility {
## WindowExtensionAbility.onWindowReady
onWindowReady(window: Window): void
onWindowReady(window: window.Window): void
Called when a window is ready.
......@@ -88,7 +88,7 @@ Called when a window is ready.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| window | [Window](js-apis-window.md) | Yes| Current **Window** instance.|
| window | [window.Window](js-apis-window.md#window) | Yes| Current **Window** instance.|
**Example**
......@@ -99,7 +99,7 @@ export default class MyWindowExtensionAbility extends WindowExtensionAbility {
onWindowReady(window) {
window.loadContent('WindowExtAbility/pages/index1').then(() => {
window.getProperties().then((pro) => {
console.log("WindowExtension " + JSON.stringify(pro));
console.log('WindowExtension ' + JSON.stringify(pro));
})
window.show();
})
......
......@@ -2,7 +2,6 @@
The **WindowAnimationManager** module provides APIs to listen for application start/exit events and window minimization/maximization events and associate animations with these events.
> **NOTE**
>
> The APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
......@@ -32,7 +31,7 @@ Before using other APIs of **windowAnimationManager**, you must call this API to
**Example**
```js
var controller = {
let controller = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
finishCallback.onAnimationFinish();
......@@ -89,8 +88,8 @@ Minimizes the window that displays the animation. This API uses an asynchronous
**Example**
```js
var target: WindowAnimationTarget = undefined;
var controller = {
let target: WindowAnimationTarget = undefined;
let controller = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
finishCallback.onAnimationFinish();
......@@ -128,7 +127,7 @@ var controller = {
windowAnimationManager.setController(controller)
var finishedCallback = null;
let finishedCallback = null;
windowAnimationManager.minimizeWindowWithAnimation(target, (err, data) => {
if (err.code) {
console.error('Failed to minimize the window target. Cause: ' + JSON.stringify(err));
......@@ -165,8 +164,8 @@ Minimizes the window that displays the animation. This API uses a promise to ret
**Example**
```js
var target: WindowAnimationTarget = undefined;
var controller = {
let target: WindowAnimationTarget = undefined;
let controller = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
finishCallback.onAnimationFinish();
......
......@@ -339,8 +339,8 @@ let strXml =
let arrayBuffer = new ArrayBuffer(strXml.length);
let bufView = new Uint8Array(arrayBuffer);
let strLen = strXml.length;
for (var i = 0; i < strLen; ++i) {
bufView[i] = strXml.charCodeAt(i);
for (var tmp = 0; tmp < strLen; ++tmp) {
bufView[tmp] = strXml.charCodeAt(tmp);
}
let that = new xml.XmlPullParser(arrayBuffer);
let arrTag = {};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册