electron/docs/fiddles/media/screenshot/take-screenshot/renderer.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
308 B
JavaScript
Raw Normal View History

const screenshot = document.getElementById('screen-shot')
const screenshotMsg = document.getElementById('screenshot-path')
screenshot.addEventListener('click', async (event) => {
screenshotMsg.textContent = 'Gathering screens...'
screenshotMsg.textContent = await window.electronAPI.takeScreenshot()
})