- From: snianu <notifications@github.com>
- Date: Thu, 09 Nov 2023 11:14:27 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 9 November 2023 19:14:32 UTC
@snianu commented on this pull request. > @@ -782,11 +782,15 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn; [SecureContext, Exposed=Window] interface Clipboard : EventTarget { - Promise<ClipboardItems> read(); + Promise<ClipboardItems> read(optional ClipboardUnsanitizedFormats formats = {}); If we just have `sequence` with `DOMString`, then we cannot make it optional (at least the bindings generator fails in Chromium). If we make it non-optional, then it would break sites that do not want to read unsanitized formats. Dictionary helps us to make this arg optional and `unsanitized` makes it explicit that authors are opting into reading unsanitized formats i.e. when sites call `navigator.clipboard.read({unsanitized: ['text/html']})`, it is clear to the reader that the site is trying to read unsanitized `text/html` format. We got [this feedback ](https://github.com/w3c/editing/issues/315#issue-942457383)from Chrome's security team. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/pull/197#discussion_r1388476659 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/pull/197/review/1723319859@github.com>
Received on Thursday, 9 November 2023 19:14:32 UTC