что-то изменилось?
let json = JSON.stringify('someInformation');
let jsonData = "data:application/json;charset=utf-8," + encodeURIComponent(json);
this.href = jsonData;
this.target = "_blank";
this.download = "test.json";
const handleDownload = () => { const element = document.createElement("a"); const file = new Blob([data], { type: "text/plain;charset=utf-8" }); element.href = URL.createObjectURL(file); element.download = `${mailPoolId}.txt`; document.body.appendChild(element); element.click(); };
Обсуждают сегодня