[clipboard-apis] Create an easier to use API (#12)

Apologies if I'm not supposed to post here, I'm not sure which is the correct venue.

While the `execCommand()` API is appropriate for an editor or similar applications, it's rather cumbersome for the common "copy something I have in memory to the clipboard" made popular by zero clipboard.

Helpful would be an API, that would allow - after an user action - setting any content to clipboard without intercepting some event. It would also make feature detection easier, `commandSupported()` seems to have several issues at least in Firefox and Chrome.

I've never written any WebIDL, so this is probably horribly wrong, but I'd see the API something like this:

```
interface Clipboard {
  void setData(DataTransferItemList data);
};

partial interface Window {
  [Replaceable] readonly attribute Clipboard clipboard;
};
```

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/12

Received on Wednesday, 15 July 2015 10:17:25 UTC