mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
JS: Add some more canonical event names as alternatives.
Most JS events are infinitive, not past tense, e.g. DOM events "click", "mouseover", "load" and Node.js events "connect", "close".
This commit is contained in:
@@ -348,11 +348,13 @@ Remote.prototype._set_state = function (state) {
|
||||
switch (state) {
|
||||
case 'online':
|
||||
this._online_state = 'open';
|
||||
this.emit('connect');
|
||||
this.emit('connected');
|
||||
break;
|
||||
|
||||
case 'offline':
|
||||
this._online_state = 'closed';
|
||||
this.emit('disconnect');
|
||||
this.emit('disconnected');
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user