Re: [clipops][editing] document.execCommand('copy', false, 'some data') ?

On Fri, Apr 10, 2015 at 2:44 PM, Hallvord Reiar Michaelsen Steen
<hsteen@mozilla.com> wrote:
> However, document.execCommand() is spec'ed as having a "value" argument.
> What about actually using it here? Simplifying the above code to:
>
> element.onclick = function(){
>     document.execCommand('copy', false, 'foo');
> }

Is this really "copying"?  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.

Received on Saturday, 11 April 2015 18:17:17 UTC