v149 · Clipboard · Async Clipboard API
Type Inspector
read() now returns ClipboardItem objects with just the type list — zero OS clipboard reads. Only getType(mime) triggers a real read. This demo traces each call with a cost badge so you can see exactly when data is fetched.
1. Copy some content (text, image, or HTML), then click Read Clipboard.
2. Choose which formats to fetch, then click Fetch Selected.
how lazy reads work
In Chrome 149+, navigator.clipboard.read() returns ClipboardItem objects immediately with .types populated — but no format data has been fetched from the OS. Calling clipboardItem.getType('text/plain') triggers the actual OS read for just that format. Formats you never call getType() for are never fetched.
If the clipboard has a 10 MB image but your app only needs text/plain, that image is never decoded or transferred.
see also
- Lazy Read Demo — on-demand format fetching
- Paste Router — route paste by available formats
- Format Priority Chain — pick best available format
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗