- From: Anne van Kesteren <notifications@github.com>
- Date: Wed, 10 Sep 2025 07:39:55 -0700
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 10 September 2025 14:39:59 UTC
annevk left a comment (w3c/clipboard-apis#240) Thank you @EdgarChen for pointing that out! I learned something new there about Safari's implementation that I had not realized and was seemingly missed by all of us during the last meeting. That `getType()` is already lazy and needs to be called before the clipboard changes. And it's lazy in a way that I think works. That is, if you do `read()`, followed by the user doing a fresh copy, followed by `getType()`, `getType()` will throw/return something empty. That model seems vastly preferable over having to cache the entire clipboard item in memory/some side table store each time `read()` is called. Especially with the proposed `clipboardchange` event making it very clear at which point invalidation for a prior `read()` happens. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/240#issuecomment-3275290624 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/issues/240/3275290624@github.com>
Received on Wednesday, 10 September 2025 14:39:59 UTC