Skip to content

Commit cfec609

Browse files
authored
update Copy Text to Clipboard
1 parent e33dd75 commit cfec609

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ function copyToClipboard() {
169169
document.execCommand("copy");
170170
171171
}
172-
172+
//new API
173+
function copyToClipboard(){
174+
navigator.clipboard.writeText(document.querySelector('#myInput').value)
175+
}
173176
174177
```
175178

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy