Re: Publishing a new WD of Clipboard API and events spec

On 28/02/2014 13:59 , Hallvord R. M. Steen wrote:
>> The general-purpose API definitely remains useful, but by far the
>> majority use case is to just copy something, usually just text.
>> There are still lots of sites out there that use Flash for the sole
>> purpose of putting some plain text in the clipboard.
>
> And we have the handy document.execCommand('copy') for that -
> browsers already generally support it though they disagree somewhat
> on how to enable it (potentially also whether it works without
> contentEditable - haven't researched this enough). The spec now says
> it should just work (tm) from semi-trusted events

I know (though I'm not sure I would call it "handy" :) but it would 
appear to be pretty unreliable.

A lot of the execCommand() world not only has poor interoperability but 
also is hard to actually fix because most of the code relying on it does 
UA-testing rather than feature-testing.

I'll admit to not have tested it recently and assumed that if people 
still didn't use it then it probably wasn't any better. But it might be 
that no one has looked at all in the past few years and that its 
interoperability has in fact improved. I'll check and see if it's worth 
investigating or not.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Friday, 28 February 2014 13:17:19 UTC