title: I'm trying to make a tag where it downloads a file but it downloads the link to the file, not the actual file
body: <p>I want to make an <code>&lt;a&gt;</code> tag where it the click function will execute a function called downloadFile() in the typescript file so it will download a log file. instead of downloading the log file, it downloads the link to the log file which does work, but I want to have the download display the actual log information.</p>
  
  <pre><code>downloadFile() {
      const blob = new Blob(['blablabla.log'], {type: 'text/log'});
      const dataURL = window.URL.createObjectURL(blob);
      if (window.navigator &amp;&amp; window.navigator.msSaveOrOpenBlob) {
        window.navigator.msSaveOrOpenBlob(blob);
        return;
      }
      const link = document.createElement('a');
      link.href = dataURL;
      link.download = 'export file.log';
      link.click();
      setTimeout(() =&gt; {
        window.URL.revokeObjectURL(dataURL);
      }, 100);
    }
  </code></pre>