I\'m trying to implement a WebSocket with a fallback to polling. If the WebSocket connection succeeds, readyState becomes 1, but if it fails, readyState>
readyState
readyState>
Look on http://dev.w3.org/html5/websockets/
Search for "Event handler" and find the Table.
onopen -> open onmessage -> message onerror ->error onclose ->close
function update(e){ /*Do Something*/}; var ws = new WebSocket("ws://localhost:9999/"); ws.onmessage = update;