4 ms·
The documentation is a bit coy about this, but the usual purpose for this sort of library is so you can modify the copied text before it hits the user's clipboa
by outsidetheparty 11y ago
The documentation is a bit coy about this, but the usual purpose for this sort of library is so you can modify the copied text before it hits the user's clipboard, to insert an advertisement or copyright notice. (See the 'data-clipboard-text' attribute.)
So, for evil. Safari not supporting execCommand copy and paste is a good thing for users.
(This claims to work in all major browsers except Safari, but I'm see the same fallback when I try it in Firefox, on OS X at least -- it shows the key combination in a popup instead of actually copying or cutting the text as it does in Chrome.)