BrainBoxLabs/brain-socket-js — pull request #4 by kyushiro (2014-09-09 13:27:06+00:00)
Title: added "onopen" event handler

Trying to fire an event before the WS connection was established caused an error (see issue #3 )
This commit adds a wrapper event around the native websockets "onopen" to ensure that the connection is actually open before firing anything