From 6efe1aa6a92ce7f9f264903e9d27fb5cf6c32bfe Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 16 Sep 2014 16:26:16 +1200 Subject: We're not ready for ES6 Lets re-evaluate in June next year when it's actually released --- web/src/js/Connection.es6.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 web/src/js/Connection.es6.js (limited to 'web/src/js/Connection.es6.js') diff --git a/web/src/js/Connection.es6.js b/web/src/js/Connection.es6.js deleted file mode 100644 index 7250dd39..00000000 --- a/web/src/js/Connection.es6.js +++ /dev/null @@ -1,34 +0,0 @@ -class _Connection { - constructor(root) { - if (!root) { - root = location.origin + "/api/v1"; - } - this.root = root; - } - init() { - this.openWebSocketConnection(); - } - openWebSocketConnection() { - this.ws = new WebSocket(this.root.replace("http", "ws") + "/ws"); - var ws = this.ws; - - ws.onopen = this.onopen.bind(this); - ws.onmessage = this.onmessage.bind(this); - ws.onerror = this.onerror.bind(this); - ws.onclose = this.onclose.bind(this); - } - onopen(open) { - console.log("onopen", this, arguments); - } - onmessage(message) { - //AppDispatcher.dispatchServerAction(...); - console.log("onmessage", this, arguments); - } - onerror(error) { - console.log("onerror", this, arguments); - } - onclose(close) { - console.log("onclose", this, arguments); - } -} -var Connection = new _Connection(); \ No newline at end of file -- cgit v1.2.3