{"action":"created","issue":{"url":"https://api.github.com/repos/ravelll/web-app-development-using-go/issues/1","repository_url":"https://api.github.com/repos/ravelll/web-app-development-using-go","labels_url":"https://api.github.com/repos/ravelll/web-app-development-using-go/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ravelll/web-app-development-using-go/issues/1/comments","events_url":"https://api.github.com/repos/ravelll/web-app-development-using-go/issues/1/events","html_url":"https://github.com/ravelll/web-app-development-using-go/issues/1","id":149795907,"number":1,"title":"チャットで送信した文字が表示されない","user":{"login":"ravelll","id":2294362,"avatar_url":"https://avatars.githubusercontent.com/u/2294362?v=3","gravatar_id":"","url":"https://api.github.com/users/ravelll","html_url":"https://github.com/ravelll","followers_url":"https://api.github.com/users/ravelll/followers","following_url":"https://api.github.com/users/ravelll/following{/other_user}","gists_url":"https://api.github.com/users/ravelll/gists{/gist_id}","starred_url":"https://api.github.com/users/ravelll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravelll/subscriptions","organizations_url":"https://api.github.com/users/ravelll/orgs","repos_url":"https://api.github.com/users/ravelll/repos","events_url":"https://api.github.com/users/ravelll/events{/privacy}","received_events_url":"https://api.github.com/users/ravelll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-20T15:04:22Z","updated_at":"2016-04-20T15:16:46Z","closed_at":null,"body":"- テンプレートの埋め込みが上手くいってないのかと思って {{.Host}} をホスト・ポート直書きにしてみたけどダメ\r\n- js のエラーは出ていない\r\n- go 側は大丈夫そうに見えるけど…？"},"comment":{"url":"https://api.github.com/repos/ravelll/web-app-development-using-go/issues/comments/212473233","html_url":"https://github.com/ravelll/web-app-development-using-go/issues/1#issuecomment-212473233","issue_url":"https://api.github.com/repos/ravelll/web-app-development-using-go/issues/1","id":212473233,"user":{"login":"ravelll","id":2294362,"avatar_url":"https://avatars.githubusercontent.com/u/2294362?v=3","gravatar_id":"","url":"https://api.github.com/users/ravelll","html_url":"https://github.com/ravelll","followers_url":"https://api.github.com/users/ravelll/followers","following_url":"https://api.github.com/users/ravelll/following{/other_user}","gists_url":"https://api.github.com/users/ravelll/gists{/gist_id}","starred_url":"https://api.github.com/users/ravelll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravelll/subscriptions","organizations_url":"https://api.github.com/users/ravelll/orgs","repos_url":"https://api.github.com/users/ravelll/repos","events_url":"https://api.github.com/users/ravelll/events{/privacy}","received_events_url":"https://api.github.com/users/ravelll/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T15:16:46Z","updated_at":"2016-04-20T15:16:46Z","body":"chat.html で発言を append するためのイベントハンドラの指定が間違っていた…！\r\n無事に発言が表示されるようになりました、良かった良かった。\r\n\r\n```diff\r\n        if (!window[\"WebSocket\"]) {\r\n          alert(\"エラー：WebSocketに対応していないブラウザです\");\r\n        } else {\r\n          socket = new WebSocket(\"ws://{{.Host}}/room\");\r\n          socket.onclose = function() {\r\n            alert(\"接続が終了しました\");\r\n          }\r\n-          socket.onclose = function(e) {\r\n+          socket.onmessage = function(e) {\r\n            messages.append($(\"<li>\").text(e.data));\r\n          }\r\n```"}}