Re: [clipboard] document.execCommand and clipboard actions

On Thu, Aug 6, 2015 at 11:00 AM, <yves.konen@ysadi.be> wrote:

> Hi,
> Sorry if I might be out of scope, I am quite new in this mailing list.
>

Welcome, and sorry that I'm late at responding.


> The clipboard is aimed to exchange any? data between any apps running on
> your computer. It is not a browser stuff, it is an OS stuff that any app,
> including a browser, may use. I would like to use it in such a way I could
> programatically cut/paste any (even not usual mime types) data, not only
> contenteditable items data.
>
> Now the problem is that the way a browser uses the clipboard has a lot of
> limitations due first to security reasons and secondly to the fact that no
> 2 UA implement it the same way... Today it is really hard, IMHO, to write
> cut/paste code working on all UA in order to exchange data with the
> "outside the browser" world. If it is to cut/paste data "inside my webapp"
> then I would not use the clipboard...
>

Right now the goal is to make things work better across the board and make
things "safe enough" to enable certain clipboard functionality for *all
scripts* out there - even without security prompts and explicit
permissions. It's pretty obvious that we need quite a lot of limitations
for this to work (including a limitation on writing whatever types and data
you'd like to the clipboard).


> I agree with the need to define a new clean Clipboard API


But we'll get to that later - first we want implementations to support what
we've got at the moment, and the spec is still changing based on
implementor feedback like that from the Blink team saying allowing JS to
write binary image data directly is too dangerous. Since implementations
are in progress right now, we'll probably learn over the next year or so if
the current stuff is safe enough, and build an improved API from what we
learn.
-Hallvord

Received on Thursday, 27 August 2015 09:58:08 UTC