From b3f3e6f098d178d3af96e3db6aa7e836ceb6f249 Mon Sep 17 00:00:00 2001 From: Hollokin Date: Sun, 7 May 2023 17:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A4=BA=E4=BE=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hollokin --- .../apis/js-apis-inputmethod-extension-context.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputmethod-extension-context.md b/zh-cn/application-dev/reference/apis/js-apis-inputmethod-extension-context.md index 40bd778f4b..fa5ba2aec0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethod-extension-context.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethod-extension-context.md @@ -44,8 +44,8 @@ destroy(callback: AsyncCallback\): void **示例:** ```js -this.context.destroy((err) => { - console.log('destroy result:' + JSON.stringify(err)); +this.context.destroy(() => { + console.log('Succeeded in destroying context.'); }); ``` @@ -67,8 +67,6 @@ destroy(): Promise\; ```js this.context.destroy().then(() => { - console.log('Succeed in destoring context.'); -}).catch((error) => { - console.log('Failed to destory context: ' + JSON.stringify(error)); + console.log('Succeed in destroying context.'); }); ``` -- GitLab