Re: [clipboard] Semi-Trusted Events Alternative

> 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.

Sincerely,
    James Greene


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

> ----- 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