ScreenshotOptions interface
Signature
export interface ScreenshotOptions
Properties
Property | Modifiers | Type | Description | Default |
---|---|---|---|---|
captureBeyondViewport |
| boolean | Capture the screenshot beyond the viewport. |
|
clip |
| Specifies the region of the page/element to clip. | ||
encoding |
| 'base64' | 'binary' | Encoding of the image. |
|
fromSurface |
| boolean | Capture the screenshot from the surface, rather than the view. |
|
fullPage |
| boolean | When |
|
omitBackground |
| boolean | Hides default white background and allows capturing screenshots with transparency. |
|
optimizeForSpeed |
| boolean |
| |
path |
| string | The file path to save the image to. The screenshot type will be inferred from file extension. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the image won't be saved to the disk. | |
quality |
| number | Quality of the image, between 0-100. Not applicable to | |
type |
| 'png' | 'jpeg' | 'webp' |
|