i am creating ahref tag dynamically using javascript to download csv file generated using javascript code. The following code is working fine in chrome but doesn't work in safari or firefox...
var a = document.createElement('a');
var blob = new Blob([str], {'type':'application\/octet-stream'});
a.href = window.URL.createObjectURL(blob);
a.download = 'export.csv';
a.click();
any help is greatly appreciated..