fixes in saves

This commit is contained in:
InsanusMokrassar 2021-03-02 16:51:08 +06:00
parent b43016bb24
commit 603da9a021

View File

@ -14,12 +14,11 @@ fun saveFile(content: String, filename: String) {
setAttribute("style", "visibility:hidden; display: none")
} as HTMLAnchorElement
val blob = Blob(arrayOf(content), BlobPropertyBag(
"text/plain;charset=utf-8"
"application/*;charset=utf-8"
))
val url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.target = "_blank"
a.click()
URL.revokeObjectURL(url)
a.remove()