Module allows Developers to subscribe on events or trigger own events
Events.on(eventName, callback)Method subscribes callback on event. It will be called when CodeX Editor emits this event
| Param | Type | Description |
|---|---|---|
| eventName | String | event name |
| callback | Function | event callback |
Events.off(eventName, callback)Method unsubscribes callback on event
| Param | Type | Description |
|---|---|---|
| eventName | String | event name |
| callback | Function | event callback |
Events.emit(eventName, data)Method emits data to all subscribed callbacks
| Param | Type | Description |
|---|---|---|
| eventName | String | event name |
| data | Object | any data |