{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/910","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/910/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/910/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/910/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/910","id":67361266,"number":910,"title":"\"input is undefined\" runtime error when using WebSockets","user":{"login":"onnoowl","id":6325919,"avatar_url":"https://avatars.githubusercontent.com/u/6325919?v=3","gravatar_id":"","url":"https://api.github.com/users/onnoowl","html_url":"https://github.com/onnoowl","followers_url":"https://api.github.com/users/onnoowl/followers","following_url":"https://api.github.com/users/onnoowl/following{/other_user}","gists_url":"https://api.github.com/users/onnoowl/gists{/gist_id}","starred_url":"https://api.github.com/users/onnoowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnoowl/subscriptions","organizations_url":"https://api.github.com/users/onnoowl/orgs","repos_url":"https://api.github.com/users/onnoowl/repos","events_url":"https://api.github.com/users/onnoowl/events{/privacy}","received_events_url":"https://api.github.com/users/onnoowl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-09T13:23:35Z","updated_at":"2015-04-10T00:59:33Z","closed_at":"2015-04-10T00:23:44Z","body":"I'm trying to set up a simple example using WebSockets in Elm, but I keep getting the run time error \"input is undefined\". The console does not give me any line number in my elm file or anything like that.\r\nThis seems like this is an issue with Elm's WebSockets... If I'm doing something wrong, please let me know.\r\n\r\nI was trying to use WebSockets in a large project, and I kept getting the error \"a is undefined\", so I decided to make this small example to try and isolate the problem.\r\n\r\nI wrote some code that receives messages containing numbers from the websocket. It increments the numbers, and then sends the new numbers back out over the web socket. The server does the same thing, sending back the number incremented by 1 to the client.\r\n\r\nHere is the elm code: https://gist.github.com/onnoowl/2540996b2ac55002d773\r\n\r\nI tested the server side, and it's working fine, so I definitely do not think that the server is causing the issue.\r\n\r\nWhen I tried the code in Firefox, I get \"input is undefined\". When I run it in Chrome, I get \"Cannot read property 'kids' of undefined\". In Chrome, upon looking at the stack trace it seems that when the code goes to run, input is undefined. Is this a bug with the WebSocket library?\r\n\r\nI'm very new to using Elm, so I'd appreciate any help/advice on using websockets."},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/91391908","html_url":"https://github.com/elm-lang/elm-compiler/issues/910#issuecomment-91391908","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/910","id":91391908,"user":{"login":"onnoowl","id":6325919,"avatar_url":"https://avatars.githubusercontent.com/u/6325919?v=3","gravatar_id":"","url":"https://api.github.com/users/onnoowl","html_url":"https://github.com/onnoowl","followers_url":"https://api.github.com/users/onnoowl/followers","following_url":"https://api.github.com/users/onnoowl/following{/other_user}","gists_url":"https://api.github.com/users/onnoowl/gists{/gist_id}","starred_url":"https://api.github.com/users/onnoowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnoowl/subscriptions","organizations_url":"https://api.github.com/users/onnoowl/orgs","repos_url":"https://api.github.com/users/onnoowl/repos","events_url":"https://api.github.com/users/onnoowl/events{/privacy}","received_events_url":"https://api.github.com/users/onnoowl/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T00:59:33Z","updated_at":"2015-04-10T00:59:33Z","body":"Ok, thanks.\nWhen do you think 0.15 will be released?\n\nAlso, is there any way to embed javascript inside elm?\nOr do I need to make an HTML document that embeds my elm code?"}}