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

Re: [clipboard] Feature detect Clipboard API support?

From: James M. Greene <james.m.greene@gmail.com>
Date: Sun, 26 Apr 2015 09:32:54 -0500
Message-ID: <CALrbKZj6wG9yTkD3TNChYJccKry39mSpxxQpF8G12FDBMU3Dtg@mail.gmail.com>
To: Ryan Seddon <seddon.ryan@gmail.com>
Cc: public-webapps <public-webapps@w3.org>, Hallvord Steen <hsteen@mozilla.com>
I haven't tested this out to see if it dispatches all the correct events in
order to be spec-compliant but Chromium just landed programmatic
copy-and-cut [with restrictions that require that there is an active,
expanded Selection/Range in the Document]:


They used `Document#queryCommandSupported` and
`Document#queryCommandEnabled` for feature detection -- the latter
requiring that there is an active, expanded Selection/Range in the Document
in order to get a positive (`true`) indicator].

For better or worse, the time for spec changes may be fleeting....

   James M. Greene
On Apr 21, 2015 7:53 PM, "Ryan Seddon" <seddon.ryan@gmail.com> wrote:

> If we did that, authors could not use synthetic clipboard events for
>> anything - right? I'm assuming that authors are going to find use cases for
>> it - for example a "cloud clipboard" implementation may want to fire actual
>> paste events so that data from the "cloud" is processed like data from the
>> local clipboard.
>>  -Hallvord
> Yep thats a very valid point I wouldn't want to stop people being able to
> trigger synthetic events, not sure of an alternative.
Received on Sunday, 26 April 2015 14:33:22 UTC

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