From 603da9a02148a9e0958999632909e50c9da49ef7 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 2 Mar 2021 16:51:08 +0600 Subject: [PATCH] fixes in saves --- web/src/jsMain/kotlin/dev/inmo/kmppscriptbuilder/web/main.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/jsMain/kotlin/dev/inmo/kmppscriptbuilder/web/main.kt b/web/src/jsMain/kotlin/dev/inmo/kmppscriptbuilder/web/main.kt index 36e52f8..84880d2 100644 --- a/web/src/jsMain/kotlin/dev/inmo/kmppscriptbuilder/web/main.kt +++ b/web/src/jsMain/kotlin/dev/inmo/kmppscriptbuilder/web/main.kt @@ -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()