Re: on execCommand() and script-triggered copy/cut/paste

On Thu, Aug 6, 2015 at 7:01 AM, Johannes Wilm <johannes@fiduswriter.org>
wrote:

>
> No, execCommand **definitely** needs to remain in the recommended spec as
>> an obsolete feature regardless of whether its use is discouraged or not.
>>
>> The idea that we should only write specifications for the bright new
>> future has failed. See XHTML 2.0. We need to spec every obsolete feature
>> that is needed for Web compatibility reasons because that’s the only way we
>> can allow people to write new interoperable browser from scratch. And I can
>> assure you can’t build a Web browser compatible with the Web without
>> contenteditable=true and execCommand support. A whole bunch of contents
>> e.g. Gmail would not work.
>>
>>
> I think there is some misunderstanding here. No information is lost.
> Everything about the clipboard api and execCommand is still specced. It's
> just that those commands relating to the clipboard are defined in the
> execCommand spec draft, just as all other execCommand based commands.
> Hallvord can also be added as an editor to the execCommand spec and then he
> can just change that section in whatever way is needed, whenever it is
> needed.
>

I'm fine with this solution although I'd also want us to respect Aryeh's
wish that we don't make a fork of his work if we don't intend to make
updates to it.

Also, a minor point: you say execCommand() only works with contentEditable,
but that's not actually the case. It depends on the command - *most* of
them are intended for contentEditable contexts, but some (like 'copy') also
work elsewhere.

FWIW, I believe it's premature to classify those features as "obsolete".
You're most likely a couple of years away from a point where your specs are
sufficiently complete and enough implementations are shipped (with enough
bugs killed) to make it feasible for web developers to start using
cE=intents. (I think that's an optimistic estimate). Do you want to simply
forbid developers from developing new stuff with rich text editing
functionality during the next couple of years? When/if the new stuff is
ready, it's time to say the old stuff shouldn't be used IMHO.

Anyway - I am perfectly happy with moving all text about execCommand out of
the Clipboard API and into the execCommand spec.
-Hallvord

Received on Thursday, 6 August 2015 12:20:04 UTC