Re: [clipboard events] click-to-copy support could be hasFeature discoverable?

> Getting back to the question of feature discoverability, if we go with
> using `document.execCommand` instead of synthetic event dispatching with
> side effects, then I would expect the proper support checks to be conducted
> with `document.queryCommandSupported` and `document.queryCommandEnabled`.

It would sort of be inconsistent with how queryCommandEnabled works and is typically used today. As far as I can tell it's typically used to enable/disable buttons in a editor UI, while you move through the text. Having queryCommandEnabled('copy') return true only during click event processing would for a typical editor make the "copy" button enabled only while you click in the document.. It would take some special-casing and logic to work around that.

What if we extend queryCommandEnabled somewhat and allow 

document.queryCommandEnabled('copy', {'userTriggered':true}) ?
-Hallvord

Received on Tuesday, 20 May 2014 20:42:53 UTC