LGTM2. After reading through things again, I'm comfortable that this intent doesn't make any substantive changes to the risk of the clipboard API, insofar as the contents of a write to the clipboard are already opaque to the user and under the site's control. The timing of that write is less critical than the timing of a read, which this intent does not affect.
Regarding the spec, I share Yoav's desire for this to be more clearly specified. I'm happy to see that there's been some movement on https://github.com/w3c/clipboard-apis/pull/158 in the meantime, and look forward to more clarification landing in the future. -mike On Fri, Nov 19, 2021 at 12:47 AM Anupam Snigdha <snianu.micros...@gmail.com> wrote: > Gentle ping.. > > On Thu, Nov 4, 2021 at 6:52 AM Thomas Steiner <to...@google.com> wrote: > >> On Wed, Nov 3, 2021 at 7:13 PM Anupam Snigdha <snianu.micros...@gmail.com> >> wrote: >> >>> This is a good scenario, but I'm not sure if this can be solved using >>> the current design. You probably want a promise to the ClipboardItem? Also, >>> I think the MIME type in the Clipboarditem is only useful when we are >>> specifying DOMString instead of Blobs, which is currently not supported in >>> Chromium. If we create a Blob after the data has been populated, then we >>> can probably just use the MIME type from the Blob during the clipboard >>> write operation. This feature can be implemented just like the promises to >>> blobs without breaking the sites that use ClipboardItem instead of promises >>> to ClipboardItem, so we should definitely consider adding this to the async >>> clipboard API in the future. >>> The promises to Blobs feature unblocks some of the key scenarios in >>> Excel online as well as scenarios where a promise to the Blob helps in >>> creating the Blob asynchronously without losing the transient user >>> activation delay, so I think this feature will still be useful even if we >>> implement promise to ClipboardItem. >>> >> >> Taking one step back, in my ideal world, Safari would just let me do the >> following without expiring the user gesture: >> >> // Works in Chromium, throws in Safariā¦ >> const { data, type } = await getDataOfUnknownType(); >> const blob = new Blob([data], { type }); >> navigator.clipboard.write([ >> new ClipboardItem({ >> [blob.type]: blob, >> }), >> ]); >> > -- > You received this message because you are subscribed to the Google Groups > "blink-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to blink-dev+unsubscr...@chromium.org. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2Bm%3DdJpVtqT753tNoQPkvEZKQrmiDOXj_QuoeESoR-%3DtiH%3DrPw%40mail.gmail.com > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2Bm%3DdJpVtqT753tNoQPkvEZKQrmiDOXj_QuoeESoR-%3DtiH%3DrPw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3DeHev9kELPJ5885ZH3Spvv0iuEAPa1UPM%3DZWb636WWisQ%40mail.gmail.com.