Re: [w3c/clipboard-apis] Spec readiness and compat (#135)

Hmm yeah, it is unfortunate that this isn't completely specified. My understanding is that the specification had quite a few properties (including `presentationStyle`, `createDelayed`, and `Promise` support for `createDelayed`) that were initially added to ensure this API would be flexible and future-proof for consensus. From there, each browser has generally implemented some subset so far, and hopes to implement the full feature-set in the future. Chrome indeed is currently missing a few of these properties (as you've discovered).

> What is `createDelayed`? It's not implemented by Chrome

My understanding of `createDelayed` is that it is intended to be used for delayed rendering of clipboard formats, for example to send multiple large payloads (ex. 1 image, 1 text), and only copy/decode/generate them when they're first used (which may be expensive/slow), through underlying-platform features like [Windows delayed rendering](https://docs.microsoft.com/en-us/windows/win32/dataxchg/clipboard-operations#delayed-rendering).

> The spec doesn't really define which MIME types should be supported for write. Chrome only supports a handful.

This is quite unfortunate. The clipboard specification does specify [Mandatory Data Types](https://www.w3.org/TR/clipboard-apis/#mandatory-data-types-x) for `DataTransfer` and `copy`/`cut`/`paste` events, which interestingly does also only have a subset of these formats implemented in all browsers. I'd be supportive of modifying this section to also cover the Async Clipboard API, as blink now implements text/plain, [text/html](https://www.chromestatus.com/feature/5357049665814528), and [image/png](https://www.chromestatus.com/feature/5074658793619456), and I'm aware that webkit [implements](https://webkit.org/blog/10855/async-clipboard-api/#post-10855:~:text=WebKit%20supports%20four%20MIME%20type%20representations%3A,%22text%2Fplain%22%2C%20%22text%2Fhtml%22%2C%20%22text%2Furi%2Dlist%22%2C%20and%20%22image%2Fpng%22.) these same formats plus text/uri-list.

Thanks for pointing these out, and I agree that it'd be nice if the specification were more clear on these things.

cc @garykac 

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

Received on Thursday, 28 January 2021 02:35:32 UTC