- From: Hallvord Reiar Michaelsen Steen <hsteen@mozilla.com>
- Date: Mon, 13 Apr 2015 14:18:54 +0200
- To: Aryeh Gregor <ayg@aryeh.name>
- Cc: WebApps WG <public-webapps@w3.org>
Received on Monday, 13 April 2015 12:19:25 UTC
On Sat, Apr 11, 2015 at 8:16 PM, Aryeh Gregor <ayg@aryeh.name> wrote:
> > element.onclick = function(){
> > document.execCommand('copy', false, 'foo');
> > }
>
> Is this really "copying"?
As in "an operation that places some data on the system clipboard", yes ;)
but I see your point of view.
> I think a new function for "set clipboard
> contents to specified value" would make more sense than overloading
> execCommand("copy") to mean something more than the standard
> text-editor meaning of "copy". Besides, execCommand() is awful and we
> should prefer other APIs when possible.
>
So.. are you suggesting something like
window.Clipboard.setData('text/plain', 'foo') ?
-Hallvord
Received on Monday, 13 April 2015 12:19:25 UTC