diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-17 02:13:37 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-17 02:13:37 +0200 |
commit | 51db9a5612f0899ed61751dbee3f4e4b19a74ea4 (patch) | |
tree | b1c7f9950f496c8216050b57b1f0e06c6eeb5424 /web/src/js/connection.js | |
parent | d998790c2f12594e6d0edc5a98e908677b60b31f (diff) | |
download | mitmproxy-51db9a5612f0899ed61751dbee3f4e4b19a74ea4.tar.gz mitmproxy-51db9a5612f0899ed61751dbee3f4e4b19a74ea4.tar.bz2 mitmproxy-51db9a5612f0899ed61751dbee3f4e4b19a74ea4.zip |
formatting
Diffstat (limited to 'web/src/js/connection.js')
-rw-r--r-- | web/src/js/connection.js | 12 |
1 files changed, 6 insertions, 6 deletions
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); }; |