parent
df41b87b82
commit
63d48b2ecb
@ -135,21 +135,54 @@ interface MediaFeature {
|
|||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ScreenshotClip {
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
export interface ScreenshotClip {
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ScreenshotOptions {
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
export interface ScreenshotOptions {
|
||||||
|
/**
|
||||||
|
* @default 'png'
|
||||||
|
*/
|
||||||
type?: 'png' | 'jpeg';
|
type?: 'png' | 'jpeg';
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
path?: string;
|
path?: string;
|
||||||
|
/**
|
||||||
|
* When true, takes a screenshot of the full page.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
fullPage?: boolean;
|
fullPage?: boolean;
|
||||||
|
/**
|
||||||
|
* An object which specifies the clipping region of the page.
|
||||||
|
*/
|
||||||
clip?: ScreenshotClip;
|
clip?: ScreenshotClip;
|
||||||
|
/**
|
||||||
|
* Quality of the image, between 0-100. Not applicable to `png` images.
|
||||||
|
*/
|
||||||
quality?: number;
|
quality?: number;
|
||||||
|
/**
|
||||||
|
* Hides default white background and allows capturing screenshots with transparency.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
omitBackground?: boolean;
|
omitBackground?: boolean;
|
||||||
encoding?: string;
|
/**
|
||||||
|
* Encoding of the image.
|
||||||
|
* @default 'binary'
|
||||||
|
*/
|
||||||
|
encoding?: 'base64' | 'binary';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user