Skip to content

ElectronWebContents.capturePage method

ElectronWebContents › capturePage

Unofficial

Captures a snapshot of the page within rect. Omitting rect captures the whole visible page.

Signature:

capturePage(rect?: ElectronRectangle | undefined): Promise<ElectronNativeImage>

Parameters:

Parameter Type Description
rect? ElectronRectangle | undefined The area of the page to capture.

Returns: Promise<ElectronNativeImage>A promise resolving with a native image.