| 42 | * copy from textarea |
| 43 | */ |
| 44 | const copyFromText = string => { |
| 45 | const textArea = createTextArea() |
| 46 | |
| 47 | textArea.innerHTML = string |
| 48 | textArea.focus() |
| 49 | textArea.select() |
| 50 | execCopy() |
| 51 | setTimeout(() => document.body.removeChild(textArea)) |
| 52 | } |
| 53 | |
| 54 | const tinyCopy = elem => { |
| 55 | if (typeof window === 'undefined') return |
no test coverage detected