- From: snianu <notifications@github.com>
- Date: Thu, 09 Nov 2023 10:01:23 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/clipboard-apis/issues/179/1804303784@github.com>
RESOLUTION: Keep the exception during `write()`, but return empty `ClipboardItem` during `read()` if system clipboard is empty. Full discussion: [17:25] <whsieh> next up: https://github.com/w3c/clipboard-apis/pull/198 [17:26] <snianu> trying to speak [17:26] <snianu> can you hear me? [17:26] <whsieh> snianu: audio issues, let's move on for now [17:26] <whsieh> snianu: nvm audio issues fixed! [17:27] <whsieh> snianu: if clipboard item is empty and developer writes to clipboard, the write will throw an exception in Chrome but FF/WebKit allows that [17:28] <whsieh> s/clipboard item is empty/clipboard item list is empty/ [17:28] <whsieh> snianu: creates confusion for web dev since it's unclear if they need to retry, or… [17:28] <whsieh> q+ [17:29] <dandclark> q+ [17:29] <whsieh> s/developer writes to clipboard/developer reads from clipboard/ [17:29] <whsieh> q- [17:29] <whsieh> snianu: read should not throw exception, write should throw exception [17:30] <whsieh> snianu: with current DT APIs dev cannot clear clipboard by writing [17:30] <whsieh> snianu: with async clipboard API you can write empty item (?) [17:30] <whsieh> snianu: maybe flag to indicate that clipboard item is intentionally "empty" [17:30] <whsieh> q+ [17:32] <whsieh> whsieh: if we want to expose a "clear clipboard" API, it should probably be navigator.clipboard.clear() or something [17:33] <whsieh> johanneswilm: seems we're all in agreement [17:33] <whsieh> sanketj_: to summarize, allow read empty items -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/179#issuecomment-1804303784 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/issues/179/1804303784@github.com>
Received on Thursday, 9 November 2023 18:01:29 UTC