title: Excel export in JavaScript using Blob not working in FireFox
body: <p>I have some JavaScript code as given under first code snippet, that works in latest Chrome but not in latest FireFox. This code is exporting data to <code>xls</code> file using Blob object. The strange thing is that in FireFox, the code does not throw any error but does nothing as it executes all the lines successfully i.e. no export happens.</p>
  
  <p>A demo for this question is at this URL: <a href="http://js.do/sun21170/84920" rel="nofollow">http://js.do/sun21170/84920</a></p>
  
  <p>If you run the code in above demo in Chrome, it will download the file <code>newfile.xls</code> ( allow popups in Chrome).</p>
  
  <p><strong>Question</strong>: What change I need to make in <code>Blob Code</code> given below, in order to make it work in FireFox?  I tried using <code>type: 'application/octet-stream'</code> and also <code>type: 'text/plain'</code>, but both did not help in FireFox.</p>
  
  <p>The variable <code>table</code> in code snippet below holds a string that is the html for rendering a table including html and body tags.</p>
  
  <p><strong>Blob Code for exporting (not working in FireFox)</strong></p>
  
  <pre><code> //export data in Chrome or FireFox
   //this works in Chrome but not in FireFox
   //also no errors in firefox
   sa = true;
   var myBlob =  new Blob( [table] , {type:'text/html'});
   var url = window.URL.createObjectURL(myBlob);
   var a = document.createElement("a");
   document.body.appendChild(a);
   a.href = url;
   a.download = "newfile.xls";
   a.click();
   window.URL.revokeObjectURL(url);
  </code></pre>