Re: [w3c/clipboard-apis] Selective Clipboard Format Read (Issue #240)

ashishkum-ms left a comment (w3c/clipboard-apis#240)

@annevk, we believe making getType() lazy could introduce certain challenges:

1. According to the [spec](https://w3c.github.io/clipboard-apis/#dom-clipboard-read)(as implemented in Chromium and Firefox), `ClipboardItem` represents a snapshot of the OS clipboard state at the time `read()` is called. If `getType()` is made lazy, it may break use cases where web apps rely on ClipboardItem as a cache of clipboard data—for example, storing separate ClipboardItem per checkpoint to maintain clipboard history.
2. While `clipboarchange` can help manage delays between `read()` and `getType()`, this would require web authors to handle additional complexity that might otherwise be avoidable.

We’re happy to discuss this further in today’s WG meeting if needed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/240#issuecomment-3279871126
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/clipboard-apis/issues/240/3279871126@github.com>

Received on Thursday, 11 September 2025 10:45:46 UTC