From b4ecd96beb77a8bae02d82eac174dded198797a3 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 17 Sep 2014 13:58:56 +1200 Subject: Introduce short form object state, and connect the ends to send data to web app --- libmproxy/web/static/js/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libmproxy/web/static/js/app.js') diff --git a/libmproxy/web/static/js/app.js b/libmproxy/web/static/js/app.js index 90a004ef..84eece87 100644 --- a/libmproxy/web/static/js/app.js +++ b/libmproxy/web/static/js/app.js @@ -221,7 +221,15 @@ _Connection.prototype.onopen = function (open) { }; _Connection.prototype.onmessage = function (message) { //AppDispatcher.dispatchServerAction(...); - console.log("onmessage", this, arguments); + var m = JSON.parse(message.data); + switch (m.type){ + case "flow": + console.log("flow", m.data); + break; + case "event": + console.log("event", m.data.message) + break; + } }; _Connection.prototype.onerror = function (error) { console.log("onerror", this, arguments); -- cgit v1.2.3