sample/public/js/index.js in sinatra-cometio-0.1.7 vs sample/public/js/index.js in sinatra-cometio-0.1.8

- old
+ new

@@ -3,9 +3,13 @@ io.on("chat", function(data){ var m = $("<li>").text(data.name + " : " +data.message); $("#chat #timeline").prepend(m); }); +io.on("*", function(event, data){ // catch all events + console.log(event + " - " + JSON.stringify(data)); +}); + io.on("connect", function(session){ console.log("connect!! "+session); $("#chat #btn_send").click(post); $("#chat #message").keydown(function(e){ if(e.keyCode == 13) post();