W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2014

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

From: Ryosuke Niwa <rniwa@apple.com>
Date: Mon, 30 Jun 2014 19:08:53 -0700
Cc: James Greene <james.m.greene@gmail.com>, Ben Peters <Ben.Peters@microsoft.com>, Anne van Kesteren <annevk@annevk.nl>, public-webapps <public-webapps@w3.org>
Message-id: <7550B6B8-D761-4266-9562-EC25DF37F722@apple.com>
To: "Hallvord R. M. Steen" <hsteen@mozilla.com>

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

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