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

On May 20, 2014, at 1:42 PM, Hallvord R. M. Steen <hsteen@mozilla.com> wrote:

>> 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}) ?

or document.queryCommandEnabled('userTriggeredCopy') ?

- R. Niwa

Received on Tuesday, 1 July 2014 02:09:33 UTC