title: Javascript function skips navigator.clipboard.writeText and just does window.open
body: <p>I have the following function:</p>
  <pre><code>function openurl(){
  navigator.clipboard.writeText(&quot;TextToCopy&quot;);
  window.open('url');
  }
  </code></pre>
  <p>executing in this:</p>
  <pre><code>&lt;button onclick=openurl()&gt;Openurlbutton&lt;/button&gt;
  </code></pre>
  <p>It only opens the window and does not copy the text.
  I am so lost.. help :D</p>