diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets index 12364bcafce9d9d8d53778c690c24531106668fd..a7200b9e02473601f3ba87077ea641c04bf5e9c8 100644 --- a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets @@ -113,6 +113,7 @@ struct webViewContMessageError { this.ports[1].postMessageEvent("post message from ets to html5"); } catch (error) { console.error(`emitPostMessageEventUnPortErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code this.errorMsg = error.message } this.controller.runJavaScript("test()",(res) => {