title: Download file/url using Javascript
body: <p>I am trying to automatically download a file using javascript by creating a link and the clicking it.
  That works but using the download attribute, to specify the name the file will have, does not work.</p>
  
  <p>Im using the code below</p>
  
  <pre><code>var a = document.createElement("a")
  a.download = "hellooo.png"
  a.href = "http://icons.iconarchive.com/icons/yellowicon/game-stars/256/Mario-icon.png";
  a.click();
  </code></pre>
  
  <p>Is there a way to make this work?    </p>