document.execCommand('copy') support across browsers, from most permissive to most restrictive (updated 2017-02-13)
Chrome, Chrome for Android
allows sync copy and async copy
(up to 1 second)
Issue 424968 - chromium - Cannot access to clipboard access via Javascript - Monorail
Opera
allows sync copy and async copy
(up to 1 second)
Safari for OS X
allows sync copy and async copy
(as of Safari 10; up to 1 second)
Internet Explorer 11
allows sync copy and async copy
(indefinite delay?) with user prompt
Firefox, Firefox for Android
allows sync copy
but not async copy
1012662 – Allow document.execCommand("cut"/"copy") to be used within the context of user generated events
1151429 – Allow JS to copy text to the clipboard by triggering document.execCommand('copy') or document.execCommand('cut') in user-initiated thread
1185052 – Consider extending IsHandlingUserInput to also return true in event callbacks triggered by a user event
1197451 – Support clipboard access in open extension API
1266654 – document.execCommand('copy') is unavailable for context menu command
Edge
allows sync copy
but not async copy
Allow async call to document.execCommand('copy') from handler of user-initiated event
iOS (all browsers)
does not allow sync copy or async copy
; no Flash support, so no opportunity for ZeroClipboard workaround
Copy buffer style:
visible
offset
hidden
Async delay:
0 ms
10 ms
100 ms
1 s
2 s
5 s
10 s
Copy Sync
Copy Async
Tried to copy: