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()

  1. 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.
  2. Reload this page
  3. Open the browser's dev tools > Console tab
  4. Click this link to attempt to read from your clipboard: V3: Read from clipboard
  5. 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