Closed hems closed 9 years ago
You're not calling the function in the context of the namespace, either call it:
io.sockets.send('something');
or use call
var send = io.sockets.send;
send.call(io.sockets, 'something');
@yads thx for your reply!
@yads lol yeah i know what i'm doing. i just thought you guys did not want to keep this behaviour as it quite odd on my personal point of view.
but if it's a "design choice", then cool.
i believe function like that should be "binded" to it's scope to avoid this kind of old school javascript issues.