headlessexperimental/headlessexperimental.go
func (p *BeginFrameParams) Do(ctx context.Context) (hasDamage bool, screenshotData []byte, err error) {
	// execute
	var res BeginFrameReturns
	err = cdp.Execute(ctx, CommandBeginFrame, p, &res)
	if err != nil {
		return false, nil, err
	}

	// decode
	var dec []byte
	dec, err = base64.StdEncoding.DecodeString(res.ScreenshotData)
	if err != nil {
		return false, nil, err
	}
	return res.HasDamage, dec, nil
}
func (p *BeginFrameParams) Do(ctx context.Context) (hasDamage bool, screenshotData []byte, err error) {
	// execute
	var res BeginFrameReturns
	err = cdp.Execute(ctx, CommandBeginFrame, p, &res)
	if err != nil {
		return false, nil, err
	}

	// decode
	var dec []byte
	dec, err = base64.StdEncoding.DecodeString(res.ScreenshotData)
	if err != nil {
		return false, nil, err
	}
	return res.HasDamage, dec, nil
}
// Do executes HeadlessExperimental.beginFrame against the provided context.
//
// 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.