diff --git a/cdp/page/page.go b/cdp/page/page.go index 968e606..57754fc 100644 --- a/cdp/page/page.go +++ b/cdp/page/page.go @@ -442,7 +442,7 @@ func (p *SetDocumentContentParams) Do(ctxt context.Context, h cdp.Handler) (err type CaptureScreenshotParams struct { Format CaptureScreenshotFormat `json:"format,omitempty"` // Image compression format (defaults to png). Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only). - FromSurface bool `json:"fromSurface,omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to false. + FromSurface bool `json:"fromSurface,omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to true. } // CaptureScreenshot capture page screenshot. @@ -465,7 +465,7 @@ func (p CaptureScreenshotParams) WithQuality(quality int64) *CaptureScreenshotPa } // WithFromSurface capture the screenshot from the surface, rather than the -// view. Defaults to false. +// view. Defaults to true. func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams { p.FromSurface = fromSurface return &p diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json index 58cf50d..6e92886 100644 --- a/cmd/chromedp-gen/protocol.json +++ b/cmd/chromedp-gen/protocol.json @@ -944,7 +944,7 @@ "name": "fromSurface", "type": "boolean", "optional": true, - "description": "Capture the screenshot from the surface, rather than the view. Defaults to false.", + "description": "Capture the screenshot from the surface, rather than the view. Defaults to true.", "experimental": true } ],