The Clipboard API — Copy, Paste, Images & the Safari Trap
navigator.clipboard.writeText() is one line — but the moment you copy an image or await a fetch before writing, Safari rejects with NotAllowedError because the await broke the user gesture. This guide covers the whole API, the promise-value fix for Safari, ClipboardItem.supports, reading images, the iframe sandbox + Permissions-Policy gotcha that breaks copy in embeds, intercepting the copy event, pasting Excel/Sheets data, accessibility, and a full error-name cheat-sheet.