(value: string)
| 657 | } |
| 658 | |
| 659 | async function writeClipboard(value: string) { |
| 660 | if (writeClipboardWithSelection(value)) return true; |
| 661 | |
| 662 | if (navigator.clipboard?.writeText) { |
| 663 | try { |
| 664 | await navigator.clipboard.writeText(value); |
| 665 | return true; |
| 666 | } catch { |
| 667 | return false; |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | return false; |
| 672 | } |
| 673 | |
| 674 | function selectCopySource(button: HTMLButtonElement) { |
| 675 | const source = button |
no test coverage detected