Re: [w3c/clipboard-apis] Should reading the clipboard throw DataError or empty clipboard items? (Issue #179)

The Web Editing Working Group just discussed `Should reading clipboard throw or return empty?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;Travis> Topic: Should reading clipboard throw or return empty?<br>
&lt;Travis> github: https://github.com/w3c/clipboard-apis/issues/179<br>
&lt;Travis> snianu: Seems like a similar issue to 180.<br>
&lt;Travis> .. if there's no HTML format in the clipboard, and the author tries to read HTML format, then what?<br>
&lt;Travis> .. makes sense to throw a DataError.<br>
&lt;Travis> .. even though the clipboard has some data, just not what is desired.<br>
&lt;Travis> snianu: If authors are trying to read HTML, but the clipboard has something that's not in the supported types.<br>
&lt;Travis> .. the clipboard item won't have any data.<br>
&lt;Travis> whsieh: interesting to note: clipboard being empty is a valid system state.<br>
&lt;Travis> .. ex: calling clear contents from the OS. The technical truth is that there are no items in the clipboard.<br>
&lt;Travis> .. how would authors use this knowledge?<br>
&lt;Travis> .. (trying to come up with a scenario)<br>
&lt;Travis> .. I guess it makes sense (either way we go) to have some consistency.<br>
&lt;Travis> snianu: Currently we throw DataError in Chromium. So does Firefox.<br>
&lt;Travis> whsieh: Pretty sure Webkit will return an empty array of items.<br>
&lt;Travis> .. I think we can adjust our behavior to match; a DataError seems pretty sensible.<br>
</details>


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

Message ID: <w3c/clipboard-apis/issues/179/1212147585@github.com>

Received on Thursday, 11 August 2022 15:29:54 UTC