const blob = new Blob([stage.elaboration], { type: "text/csv" });
if(window.navigator.msSaveOrOpenBlob) //IE & Edge
{
//msSaveBlob only available for IE & Edge
window.navigator.msSaveBlob(blob,"kansiris.txt");
}
else //Chrome & FF
{
const url = window.URL.createObjectURL(blob);
const anchor = document.createElement("a");
anchor.href = url;
anchor.download = "kansiris.txt";
document.body.appendChild(anchor); //For FF
anchor.click();
//It's better to remove the elem
document.body.removeChild(anchor);
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.