diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets index 398a0a025badac882cd28f89ccd9b9b01004dc91..64cdc90d4653c19360a07eb04de10aa6c72c35dc 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets @@ -100,8 +100,7 @@ struct webONHttpErrorReceive { Utils.emitEvent(event.response.getResponseMimeType(), 476); console.log('getResponseCode:' + event.response.getResponseCode()); Utils.emitEvent(event.response.getResponseCode(), 478); - this.title = JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl(); - console.log("this.title result is :" + this.title); + console.log("this.title result is :" + JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl()); console.log('getReasonMessage:' + event.response.getReasonMessage()); Utils.emitEvent(event.response.getReasonMessage(), 480); let result = event.request.getRequestHeader() @@ -124,7 +123,7 @@ struct webONHttpErrorReceive { console.log('The response header last result is ' + this.responseKey + this.responseValue); Utils.emitEvent(this.responseKey, 486); Utils.emitEvent(this.responseValue, 488); - Utils.emitEvent(this.title, 490) + Utils.emitEvent(JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl(), 490) }) } } diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets index a75aa5dfbe9a98da490443b7b81b263ab4f1922c..3f8fbe198319fac498cc37ec12acd38775e8ee73 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets @@ -85,13 +85,8 @@ struct webOnFirstContFour { event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId) if (event.firstContentfulPaintMs > 0 && event.navigationStartTick > 0) { this.firstcontentfulpaint = true; - console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId); - } - }) - .onPageEnd((event) => { - console.log('url' + event.url + this.firstcontentfulpaint + this.firstId); - if (this.firstBoo) { Utils.emitEvent(this.firstcontentfulpaint, this.firstId) + console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId); } }) } diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets index c89ef844de4b2d3d14b4312912c460b6062f0fe9..58ce74dcdf442ca9a5a5ce6436f840658f26d5b0 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets @@ -85,11 +85,6 @@ struct webOnSslError { Utils.emitEvent(this.sslerrorText, this.firstId) return true }) - .onErrorReceive((event) => { - console.log('getErrorInfo:' + event.error.getErrorInfo()) - console.log('getErrorCode:' + event.error.getErrorCode()) - console.log('url:' + event.request.getRequestUrl()) - }) } } } \ No newline at end of file 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) => {