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 40bd778f4bda780fb35fe44aa764cdfc9be79bfa..fa5ba2aec075b22fc0900199d0dc200ede8529df 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.'); }); ```