diff --git a/en/application-dev/reference/apis/js-apis-commonEvent.md b/en/application-dev/reference/apis/js-apis-commonEvent.md index 655c8682e35e4fe583806a9c9d9c152b0b895abf..32045b0f0c9ed3b12b105e154611456ced48c46b 100644 --- a/en/application-dev/reference/apis/js-apis-commonEvent.md +++ b/en/application-dev/reference/apis/js-apis-commonEvent.md @@ -169,9 +169,9 @@ Publishes a common event with given attributes. This method uses a callback to r ```js // Attributes of a common event. var options = { - code: 0; // Result code of the common event - data: "initial data";// Result data of the common event - isOrdered: true; // The common event is an ordered one. + code: 0, // Result code of the common event + data: "initial data",// Result data of the common event + isOrdered: true // The common event is an ordered one. } // Callback for common event publication function PublishCallBack(err) { diff --git a/en/application-dev/reference/arkui-js/js-components-canvas-image.md b/en/application-dev/reference/arkui-js/js-components-canvas-image.md index 8ad046dea4f04309fca88e860adf17f3a561d6ad..32bd1bb59a4e3fe52150b32240a18c1b3ac049ea 100644 --- a/en/application-dev/reference/arkui-js/js-components-canvas-image.md +++ b/en/application-dev/reference/arkui-js/js-components-canvas-image.md @@ -89,7 +89,7 @@ export default { onShow(){ const el =this.$refs.canvas - var ctx = this.$element('drawImage').getContext('2d'); + var ctx =el.getContext('2d'); var img = new Image(); img.src = 'common/images/example.jpg'; img.onload = function() {