Re: [w3c/clipboard-apis] Support for putting images on the clipboard (#44)

> The current specified API lacks the ability to put images on the clipboard.

The intent of the recently-added [Async clipboard API](https://w3c.github.io/clipboard-apis/#async-clipboard-api) is that it supports image data.  The old synchronous clipboard API is not going to support image copy, primarily because of security concerns that can only be addressed with an async API.

See the recent [async clipboard proposal](https://github.com/garykac/clipboard/blob/master/clipboard.md) for background on this. In summary, for image support the clipboard API needs to be async to allow (1) the image data to be santiized, and (2) to allow user agents to query the user for permission.

Also, in general, `execCommand()` in somewhat deprecated in that it is not going to be updated and no new specs will be written to rely on it.

We discussed adding helper accessors to read/write "text" and "image" data from/to the clipboard, but so far I've only added the "text" helpers in the spec. Adding image helpers would make it more apparent that the API is intended for images as well, so I should go ahead and do that (and add examples).

> This is intended to be a temporary solution until we can agree on a common implementation to be shared between browsers.

The current async proposal is the result of the browser vendors discussing and coming to an agreement on how we should address this.

So, rather than adding a browser-specific temporary solution, you should consider adding support for the  async API instead. Since there is already cross-browser agreement for this (and Chrome is currently working on an implementation that will ship soon), it will probably be a lot easier to get approval for your changes.

Let me know if you have any questions -- especially if you start working on an implementation since the first two independent implementations are always the most critical.


-- 
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/44#issuecomment-313560555

Received on Friday, 7 July 2017 01:13:00 UTC