未验证 提交 672642ce 编写于 作者: K king_he 提交者: Gitee

update en/application-dev/reference/apis/js-apis-eventhub.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 b78e19bd
# EventHub
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>
> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -34,10 +34,10 @@ Subscribes to an event.
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description |
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name.|
| callback | Function | Yes| Callback invoked when the event is triggered.|
| event | string | Yes| Event name. |
| callback | Function | Yes| Callback invoked when the event is triggered. |
**Example**
......@@ -74,8 +74,8 @@ Unsubscribes from an event. If **callback** is specified, this API unsubscribes
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name.|
| callback | Function | No| Callback for the event. If **callback** is unspecified, all callbacks of the event are unsubscribed.|
| event | string | Yes| Event name. |
| callback | Function | No | Callback for the event. If **callback** is unspecified, all callbacks of the event are unsubscribed. |
**Example**
......@@ -112,8 +112,8 @@ Triggers an event.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name.|
| ...args | Object[] | Yes| Variable parameters, which are passed to the callback when the event is triggered.|
| event | string | Yes| Event name. |
| ...args | Object[] | Yes| Variable parameters, which are passed to the callback when the event is triggered. |
**Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册