v132 · miscellaneous
Support creating ClipboardItem with Promise<DOMString>
The ClipboardItem, which is the input to the async clipboard write method, now accepts string values in addition to Blobs in its constructor. ClipboardItemData can be a Blob, a string, or a Promise that resolves to either a Blob or a string.
concepts
-
ClipboardItem<Promise>
Lazy / async clipboard content.
-
image fetch + copy
The motivating workflow: fetch image bytes, hand the Promise to ClipboardItem, browser holds the slot open.
-
Async Clipboard Playground
Four scenarios side by side: immediate string, Promise-delayed string, fetch-then-copy, and read-back. Each shows the event timeline and whether Chrome 133 allows the operation.
-
multi-format builder
Build a two-format ClipboardItem (text/plain + text/html, etc), copy it, then read it back through the clipboard API and see every format.
-
Rich Copy Formatter
Edit rich text from three templates (code snippet, meeting notes, data table), then copy it with both HTML and plain-text representations using
ClipboardItemwith string values directly — noBlobwrapper needed. Paste into Word or Gmail to see the rich format.
why it shipped
The current implementation of the ClipboardItem constructor accepts data as either a Blob or a Promise<Blob>. However, according to the Clipboard API specification, the constructor should accept ClipboardItemData, which can include Promise<(DOMString or Blob)>.