code: func (c *ChromeTarget) dispatchResponse(msg []byte) {
  	f := &responseHeader{}
  	err := json.Unmarshal(msg, f)
  	if err != nil {
  		c.debugf("error reading response data from chrome target: %v\n", err)
  	}
  
  	c.replyLock.Lock()
  
  	if r, ok := c.replyDispatcher[f.Id]; ok {
  		delete(c.replyDispatcher, f.Id)
  		c.replyLock.Unlock()
  		c.debugf("%d dispatching\n", f.Id)
  		c.dispatchWithTimeout(r, f.Id, msg)
  		return
  	}
  	c.replyLock.Unlock()
  
  	c.checkTargetDisconnected(f.Method)
  
  	c.eventLock.RLock()
  	if r, ok := c.eventDispatcher[f.Method]; ok {
  		c.eventLock.RUnlock()
  		c.debugf("dispatching %s event: %s\n", f.Method, string(msg))
  		go r(c, msg)
  		return
  
  	}
  	c.eventLock.RUnlock()
  
  	if c.debugEvents == true {
  		log.Printf("\n\nno event recv bound for: %s\n", f.Method)
  		log.Printf("data: %s\n\n", string(msg))
  	}
  }
docs: // dispatchResponse takes in the json message and extracts
  // the id or method fields to dispatch either responses or events
  // to listeners.