(element)
| 44 | |
| 45 | export |
| 46 | function select_text(element) { |
| 47 | const doc = document; |
| 48 | if ((doc.body as any).createTextRange) { |
| 49 | const range = (document.body as any).createTextRange(); |
| 50 | range.moveToElementText(element); |
| 51 | range.select(); |
| 52 | } else if (window.getSelection) { |
| 53 | const selection = window.getSelection(); |
| 54 | const range = document.createRange(); |
| 55 | range.selectNodeContents(element); |
| 56 | selection.removeAllRanges(); |
| 57 | selection.addRange(range); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | export |
| 62 | function copy_image_to_clipboard(data) { |
no test coverage detected