> 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.
> 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.
...
@@ -34,10 +34,10 @@ Subscribes to an event.
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name.|
| event | string | Yes| Event name.|
| callback | Function | Yes| Callback invoked when the event is triggered.|
| callback | Function | Yes| Callback invoked when the event is triggered.|
**Example**
**Example**
...
@@ -74,8 +74,8 @@ Unsubscribes from an event. If **callback** is specified, this API unsubscribes
...
@@ -74,8 +74,8 @@ Unsubscribes from an event. If **callback** is specified, this API unsubscribes
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name.|
| event | string | Yes| Event name.|
| callback | Function | No| Callback for the event. If **callback** is unspecified, all callbacks of the event are unsubscribed.|
| callback | Function | No | Callback for the event. If **callback** is unspecified, all callbacks of the event are unsubscribed. |
**Example**
**Example**
...
@@ -112,8 +112,8 @@ Triggers an event.
...
@@ -112,8 +112,8 @@ Triggers an event.
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name.|
| event | string | Yes| Event name.|
| ...args | Object[] | Yes| Variable parameters, which are passed to the callback when the event is triggered.|
| ...args | Object[] | Yes| Variable parameters, which are passed to the callback when the event is triggered.|