From 8a4820cf34358b9a33ebb208c455acd3b032b733 Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Tue, 12 Feb 2013 18:54:45 +0100 Subject: [PATCH] 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". --- src/js/remote.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/remote.js b/src/js/remote.js index 20717340cf..e1fd61c8da 100644 --- a/src/js/remote.js +++ b/src/js/remote.js @@ -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; }