From 51db9a5612f0899ed61751dbee3f4e4b19a74ea4 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 17 Sep 2014 02:13:37 +0200 Subject: formatting --- web/src/js/connection.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web/src/js/connection.js') diff --git a/web/src/js/connection.js b/web/src/js/connection.js index e752e2fe..0a74ed33 100644 --- a/web/src/js/connection.js +++ b/web/src/js/connection.js @@ -1,10 +1,10 @@ function _Connection(url) { this.url = url; } -_Connection.prototype.init=function() { +_Connection.prototype.init = function () { this.openWebSocketConnection(); }; -_Connection.prototype.openWebSocketConnection=function() { +_Connection.prototype.openWebSocketConnection = function () { this.ws = new WebSocket(this.url.replace("http", "ws")); var ws = this.ws; @@ -13,17 +13,17 @@ _Connection.prototype.openWebSocketConnection=function() { ws.onerror = this.onerror.bind(this); ws.onclose = this.onclose.bind(this); }; -_Connection.prototype.onopen=function(open) { +_Connection.prototype.onopen = function (open) { console.log("onopen", this, arguments); }; -_Connection.prototype.onmessage=function(message) { +_Connection.prototype.onmessage = function (message) { //AppDispatcher.dispatchServerAction(...); console.log("onmessage", this, arguments); }; -_Connection.prototype.onerror=function(error) { +_Connection.prototype.onerror = function (error) { console.log("onerror", this, arguments); }; -_Connection.prototype.onclose=function(close) { +_Connection.prototype.onclose = function (close) { console.log("onclose", this, arguments); }; -- cgit v1.2.3