I have the following function:
function openurl(){
navigator.clipboard.writeText("TextToCopy");
window.open('url');
}
executing in this:
<button onclick=openurl()>Openurlbutton</button>
It only opens the window and does not copy the text. I am so lost.. help :D