W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

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

From: Hallvord Reiar Michaelsen Steen <hsteen@mozilla.com>
Date: Fri, 10 Apr 2015 23:09:37 +0200
Message-ID: <CAE3JC2xknFsqG853gECo34Nb_1AEdq+sQsXD88Mc4pErkpV3+A@mail.gmail.com>
To: Daniel Cheng <dcheng@chromium.org>
Cc: WebApps WG <public-webapps@w3.org>
On Fri, Apr 10, 2015 at 10:55 PM, Daniel Cheng <dcheng@chromium.org> wrote:

> 1) I was under the impression (and MDN supports this) that the value
> argument for execCommand() must be a DOMString. Has that changed?

No. We'd have to consider changing it if the second example looks like
something we want to support (and in that case of course evaluate the
compatibility impact of potentially changing it - carefully..) Right now
I'm just throwing out ideas..

> 2) How would a supplied value interact with existing copy/cut handlers?

I think it makes sense to let any copy/cut handlers that modify the
DataTransfer object "win" since these are chronologically acting after the
document.execCommand() call. Basically, the default action of the paste
action becomes placing the text passed to execCommand() as its third
argument on the clipboard - but the default action can be overridden by
event listeners.

Any thoughts on whether this is a good idea? :)
Received on Friday, 10 April 2015 21:10:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:55 UTC