<p dir="auto">Below is my code to reproduce problem:</p>
<p dir="auto">function downloadFile(fileName, content){<br>
var aLink = document.createElement('a');<br>
var blob = new Blob([content]);<br>
var evt = document.createEvent("HTMLEvents");<br>
evt.initEvent("click", false, false);<br>
aLink.download = fileName;<br>
aLink.href = URL.createObjectURL(blob);<br>
aLink.dispatchEvent(evt);<br>
}</p>
<p dir="auto">This function work well in chrome but atom/electron.</p>
<p dir="auto">Then, I tried the other way like this:</p>
<pre class="notranslate">&lt;a href="http://example.com/xxx.zip" download="xxx.zip"&gt;download&lt;/a&gt;
</pre>
<p dir="auto">it also doesn't work properly</p>
<p dir="auto">Thanks for the nice project, folks.</p>
<p dir="auto">I'm using electron to wrap our web application in a webview and distribute this application this way.</p>
<p dir="auto">Unfortunately we discovered that links with the <code class="notranslate">download</code> attribute don't work.</p>
<p dir="auto">E.g. <a href="http://davidwalsh.name/demo/html5-download.php" rel="nofollow">http://davidwalsh.name/demo/html5-download.php</a></p>
<p dir="auto">Works perfectly fine in Chrome but unfortunately does not inside of the webview in electron.</p>
<p dir="auto">I digged the issues already and couldn't find any information on this specific case.</p>
<p dir="auto">Any ideas on this are more than welcome. <img class="emoji" title=":bowtie:" alt=":bowtie:" src="https://github.githubassets.com/images/icons/emoji/bowtie.png" height="20" width="20" align="absmiddle"></p>
<p dir="auto">Thanks. :)</p>