demo · v149
Format Cost Meter
The lazy-read change in Chrome 149 only matters if your clipboard contains expensive formats you don't need. Configure a realistic clipboard payload below, choose which formats your app actually reads, and see the estimated decode cost of eager-read (all formats) versus lazy-read (only the formats you request).
Clipboard preset:
Formats on clipboard (check = your app reads it)
Cost comparison
Eager (pre-149)
—
Lazy (Chrome 149+)
—
// Chrome 149+ — only read text/plain (one OS clipboard access)
const items = await navigator.clipboard.read();
for (const item of items) {
// item.types available immediately at zero cost
if (item.types.includes('text/plain')) {
const blob = await item.getType('text/plain'); // ← one OS read
const text = await blob.text();
doSomethingWith(text);
// text/html, image/png never fetched → no cost
}
}
// Pre-149 — all formats read on navigator.clipboard.read()
// text/html decoded → image/png decoded → text/plain decoded
// even if only text/plain is used
see also
- Eager vs. Lazy Comparison — timing comparison
- Format Priority Chain — priority-ordered format negotiation
- Type Inspector — step-by-step cost per call
- ChromeStatus: Selective Clipboard Format Read
- MDN — Clipboard.read()
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗