electron-screenshot-updated

take a screenshot in an existing electron window

Usage no npm install needed!

<script type="module">
  import electronScreenshotUpdated from 'https://cdn.skypack.dev/electron-screenshot-updated';
</script>

README

electron-screenshot

js-standard-style Greenkeeper badge

Take screenshots in an electron window. Note: This is an updated version of an existing package by JamesKyburz. The package was broken due to an update with electron.

Install

npm install electron-screenshot-updated

Usage

Use in an already existing atom-shell window

for a standalone implementation see electron-screenshot-service

var screenshot = require('electron-screenshot')
screenshot(options, [cb])

options

filename

png filename

delay (in ms)

default 0

crop

uses the nativeImage crop function. needs an electron rectangle object