Test writing text to clipboard
This link should copy the text "publicKeyText" to your clipboard:
Copy text to clipboard
Test catching an error
In source code, see: function clipboardPromiseV3()
- In your browser settings for this site (gregorlove.com), deny the Clipboard permission. This means your browser won't let my site read from your clipboard.
- Reload this page
- Open the browser's dev tools > Console tab
- Click this link to attempt to read from your clipboard: V3: Read from clipboard
- In the dev tools Console, you should see "V3: error reading", which is the
catch() block running.
Docs
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard