title: File download not working on firefox
body: <p>I have written this piece of code which is working perfect on Google Chrome and Opera but not working on Firefox</p>
  
  <pre><code>function onSaveJPG(url,n){
      var save = document.createElement('a');
      save.href = url;
      save.target = '_blank';
      save.download = 'Image no '+n+'.jpeg' || url;
      var event = document.createEvent('Event');
      event.initEvent('click', true, true);
      save.dispatchEvent(event);
      (window.URL || window.webkitURL).revokeObjectURL(save.href);
  }
  </code></pre>
  
  <p>What is wrong? please guide me.</p>