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 the clipboard throw DataError or empty clipboard items?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;Travis> topic: should reading the clipboard throw DataError or empty clipboard items?<br>
&lt;Travis> github: https://github.com/w3c/clipboard-apis/issues/179<br>
&lt;Travis> (reads the issue)<br>
&lt;Travis> whsieh_: this is the situation where there IS data on the clipboard, but none of it can be consumed by the webpage...?<br>
&lt;Travis> .. seems weird to throw a DataError in the case where there is nothing in the clipboard/pasteboard...<br>
&lt;Travis> .. in that case, returning an empty list.<br>
&lt;Travis> travis: I like just returning an empty list too--easy for web authors to handle with erroring out...<br>
&lt;Travis> whsieh_: In the specific example that snianu (Anupam) gave, I'm not sure if the error is OK.<br>
&lt;Travis> .. probably can't resolve on this at this time without further discussion with snianu?<br>
&lt;Travis> s/snianu?/snianu.<br>
&lt;Travis> johanneswilm: can the JS Editors differentiate between the different error conditions?<br>
&lt;Travis> .. could the user re-request? E.g., if the user didn't grant permission?<br>
&lt;Travis> whsieh_: recap; there are cases where a website might want to know whether they can try again, or whether they shouldn't try again.<br>
&lt;Travis> .. empty list vs throw error could be a way to differentiate.<br>
&lt;Travis> johanneswilm: there are two other cases...<br>
&lt;Travis> .. one where the user didn't give access, and one where the clipboard is changed after access is granted.<br>
&lt;Travis> whsieh_: in the first case, Safari throws "NotAllowed" (from the user denying paste).<br>
&lt;Travis> .. in the case where it changed, we also throw an error; but the type of error may not make sense...<br>
&lt;Travis> .. could look at changing it?<br>
&lt;Travis> (no resolution yet)<br>
</details>


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

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

Received on Thursday, 14 July 2022 15:20:55 UTC