code: function(event, cb) {
          _worker.postMessage({ cmd: 'ws_on' });
          _worker.addEventListener('message', function(e) {
            if (event === 'all' || e.data.type === event) {
              cb(e.data);
            } 
          });
        }
docs: Registers a callback to a specific Worker event listener.
  There are two different events:
  
  - 'all' ~> subscribes to all websocket messages
  - 'type'~> subscribes to all websocket messages containing
  a field named 'type'.
  
  For example, WebSockets Server events like this one:
  
  {
  'type': 'tweet',
  'data': ...
  }
  
  can be handled in the following way:
  
  ws.on('twitter', function(data) {
  ...
  });
  
  @param  {string}   event The event name
  @param  {Function} cb    Callback with output data (first param)