3 ms·
In what browser is Flash still required? I've been doing: to_clipboard = (text) -> textarea = document.getElementById "copy-workaround" tex
by TkTech 12y ago
In what browser is Flash still required? I've been doing:
to_clipboard = (text) ->
textarea = document.getElementById "copy-workaround"
textarea.value = text
textarea.select()
document.execCommand "copy", false, null
In chrome for years.
- timothya 12y agoThat code doesn't work (at least in ordinary page scripts), as far as I can tell. http://jsfiddle.net/vej6vbdt/ http://jsfiddle.net/vej6vbdt/
- TkTech 12y agoYou're entirely right, after looking into it a bit, it seems it's blocked now in everything but content pages (which is where I use it)