mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* 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>
8 lines
294 B
JavaScript
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
|
|
})
|