Re: [clipboard events] click-to-copy support could be hasFeature discoverable?
2015-04-20 22:48:25 GMT
Hallvord: By the way, please add the editor of the HTML spec to the beginning of the list in your references. It's strange to list a bunch of author names, but not the person who actually writes the spec.
Is anything incorrect here? https://w3c.github.io/clipboard-apis/#references
On Fri, May 23, 2014 at 8:21 AM, James Greene <james.m.greene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:This kind of copy does not implicitly have anything to do with Selection, unless we continue to have its default action be copying the currently selected text. It is substantially more likely to be used for custom text insertion.
I'd assume something like:// Copy text:
// Copy HTML text:
span = document.createElement("span");
span.innerHTML = "<b>hello</b>";
// Copy an image from a CanvasImageSource:
// Copy the selection:
// Copy HTML text with plaintext alternative:dt = new DataTransferItemList();dt.add("hello", "text/plain");dt.add(span.innerHTML, "text/html");window.copyToClipboard(dt);