提交 dea1e749 编写于 作者: X xinking129

Submitting page loading completed document management

Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 adb77993
......@@ -2599,4 +2599,46 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise&lt;Caller&
// 处理入参错误异常
console.error('error.code: ${paramError.code}, error.message: ${paramError.message}');
}
```
## UIAbilityContext.reportDrawnCompleted
reportDrawnCompleted(callback: AsyncCallback<void>): void;
页面加载完成时为开发者提供打点功能(callback形式)
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | 是 | 页面加载完成打点的回调函数。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000011 | The context does not exist. |
| 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
```ts
try {
this.context.reportDrawnCompleted((err) => {
if (err.code) {
// 处理业务逻辑错误
console.error(`reportDrawnCompleted failed, code is ${err.code}, message is ${err.message}`);
return;
}
// 执行正常业务
console.info('reportDrawnCompleted succeed');
});
} catch (err) {
// 捕获同步的参数错误
console.error(`reportDrawnCompleted failed, code is ${err.code}, message is ${err.message}`);
}
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册