title: JavaScript: How to open a link in a new tab without window.open()?
body: <p>I have an href that I need to open in a new tab, and can't use an anchor tag because it's from within a webgl context. The following accomplishes this:</p>
  <pre class="lang-js prettyprint-override"><code>window.open(href, &quot;_blank&quot;);
  </code></pre>
  <p>However, it comes with the large caveat that the new tab shares a runtime/process with the original, which for a heavy web-app leads to resource problems.</p>
  <p>I tried creating an invisible anchor tag and clicking it via JS as a workaround:</p>
  <pre class="lang-js prettyprint-override"><code>const anchor = document.createElement(&quot;a&quot;);
  anchor.setAttribute(&quot;href&quot;, href);
  anchor.setAttribute(&quot;target&quot;, &quot;_blank&quot;);
  
  anchor.click();
  </code></pre>
  <p>but Chrome blocks this as a &quot;popup&quot;.</p>
  <p>There must be some way to do this, surely?</p>