code: func (c *HeadlessExperimental) BeginFrameWithParams(v *HeadlessExperimentalBeginFrameParams) (bool, string, error) {
  	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "HeadlessExperimental.beginFrame", Params: v})
  	if err != nil {
  		return false, "", err
  	}
  
  	var chromeData struct {
  		Result struct {
  			HasDamage      bool
  			ScreenshotData string
  		}
  	}
  
  	if resp == nil {
  		return false, "", &gcdmessage.ChromeEmptyResponseErr{}
  	}
  
  	// test if error first
  	cerr := &gcdmessage.ChromeErrorResponse{}
  	json.Unmarshal(resp.Data, cerr)
  	if cerr != nil && cerr.Error != nil {
  		return false, "", &gcdmessage.ChromeRequestErr{Resp: cerr}
  	}
  
  	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
  		return false, "", err
  	}
  
  	return chromeData.Result.HasDamage, chromeData.Result.ScreenshotData, nil
  }
docs: // BeginFrameWithParams - Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gl/3zHXhB for more background.
  // Returns -  hasDamage - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future. screenshotData - Base64-encoded image data of the screenshot, if one was requested and successfully taken.