title: Any way to mimic the download attribute of an anchor tag?
body: <p>The <code>download</code> attribute of an <code>&lt;a&gt;</code> tag helps Edge <a href="https://stackoverflow.com/questions/42002903/how-to-prevent-a-blank-tab-from-appearing-in-edge-when-clicking-on-a-file-link">open download links more nicely</a> (i.e. it closes the target tab once it realises it won't be used).  Is there any way to do that when Javascript is responsible for initiating the download?  As in </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;span class='btn-link' onclick='openReport(@orderNumber, @tableBodyId); return false;'&gt;
  </code></pre>
  
  <p>Javascript (talking to ASP.NET MVC controller):</p>
  
  <pre><code>function openReport(orderNumber, tableBodyId) {
      var url = "/Reports/ValuationReportDocPdf?orderNumber=" + orderNumber;
      var win = window.open(url, '');
      setTimeout(function () { location.reload(); }, 3000);
  }
  </code></pre>