mirror of
https://github.com/InsanusMokrassar/KotlinPublicationScriptsBuilder.git
synced 2024-12-22 00:27:23 +00:00
fixes in saves
This commit is contained in:
parent
b43016bb24
commit
603da9a021
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user