Files
electron/docs/fiddles/system/clipboard/paste/renderer.js
trop[bot] 9f028cc45c chore: always lint JS in docs/fiddles (#38108)
* chore: always lint JS in docs/fiddles

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2023-04-24 19:45:40 +02:00

8 lines
294 B
JavaScript

const pasteBtn = document.getElementById('paste-to')
pasteBtn.addEventListener('click', async () => {
await window.clipboard.writeText('What a demo!')
const message = `Clipboard contents: ${await window.clipboard.readText()}`
document.getElementById('paste-from').innerHTML = message
})