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

Re: [clipboard] Semi-Trusted Events Alternative

From: James M. Greene <james.m.greene@gmail.com>
Date: Mon, 15 Sep 2014 15:28:56 -0500
Message-ID: <CALrbKZiK5YFtvTnrmqDaUZwH+Z0y6G6KyjnuW_ETxhh-cLUfzA@mail.gmail.com>
To: "Hallvord R. M. Steen" <hsteen@mozilla.com>
Cc: Ben Peters <Ben.Peters@microsoft.com>, Perry Smith <pedzsan@gmail.com>, public-webapps <public-webapps@w3.org>
> In that case you could use try...catch for the same detection, no?

Hopefully that would cover it.  I'm not even sure if all of the browsers
return true/false (or throw) consistently for `execCommand` calls.  It is
an API that seemed to have pretty wildly divergent behavior cross-browser,
at least in years past.  I'd need to do a little more testing first to
verify either way.

    James Greene

On Mon, Sep 15, 2014 at 3:25 PM, Hallvord R. M. Steen <hsteen@mozilla.com>

> ----- Original Message -----
> From: "James M. Greene" <james.m.greene@gmail.com>
> >> So if, in response to a click event your document.execCommand('copy')
> call
> >> returns false, you will have to fall back on the Flash clipboard
> widgets.
> >> Might be all you need?
> > That may be true in the modern browsers that compliant with the Editing
> > spec[1] but it certainly won't work for trying to detect the need for
> Flash
> > fallbacks in older browsers as some of them will throw an Error instead
> of
> > returning false.
> In that case you could use try...catch for the same detection, no?
> -Hallvord
Received on Monday, 15 September 2014 20:29:44 UTC

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