* Support for global event callbacks * This is useful for generic error and loading handling * @method on * @memberof StreamClient.prototype * @param {string} event - Name of the event * @param {function} callback - Function that is called when the event fires * @example * clien
(event: string, callback: HandlerCallback)
| 408 | * client.on('response', callback); |
| 409 | */ |
| 410 | on(event: string, callback: HandlerCallback) { |
| 411 | this.handlers[event] = callback; |
| 412 | } |
| 413 | |
| 414 | /** |
| 415 | * Remove one or more event handlers |
no outgoing calls
no test coverage detected