Skip to content

VM Code SDK v2 / SelectorScreenshotOptions

Type alias: SelectorScreenshotOptions

SelectorScreenshotOptions: object & TimeoutOption

Type declaration

caret?

optional caret: "hide" | "initial"

When set to "hide", screenshot will hide text caret. When set to "initial", text caret behavior will not be changed. Defaults to "hide".

filename?

optional filename: string

The name of the image, if omitted screenshot_unix timestamp.jpg will be used.

mask?

optional mask: ISelector[]

Specify selectors that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box #FF00FF that completely covers its bounding box.

omitBackground?

optional omitBackground: boolean

Hides default white background and allows capturing screenshots with transparency. Not applicable to jpeg images. Defaults to false.

quality?

optional quality: number

The quality of the image, between 0-100. Not applicable to png images.

scale?

optional scale: "css" | "device"

When set to "css", screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using "device" option will produce a single pixel per each device pixel, so screenhots of high-dpi devices will be twice as large or even larger.

Defaults to "device".