I have a really simple websocket test on chrome, but it seems to fail:
var ws = new WebSocket('ws://localhost:8002/', 'a')
ws.onopen(function() {
console.log("ok")
})
He says to me Uncaught TypeError: Property 'onopen' of object #<WebSocket> is not a function. I would suggest that onopen should exist as a method, regardless of whether the websocket server really works, but I have one run on this port.
I am using chrome 32.0.1700. I see that all callback methods (onopen, onmessage, etc.) are null. What's going on here?
source
share