aboutsummaryrefslogtreecommitdiff
path: root/src/Lib/File.ml
diff options
context:
space:
mode:
authorJoris2022-07-05 21:55:41 +0200
committerJoris2023-01-28 09:35:55 +0100
commit063d8ef9eaf874a941f4459e831057dd0a1b7ddd (patch)
treec4a8b27cb8fdb5d1dc26c560c7483c9593f40dac /src/Lib/File.ml
parent2936f06576997bffe7903ea840df563a408efc21 (diff)
downloadmap-main.tar.gz
map-main.tar.bz2
map-main.zip
Rewrite in TSmain
Diffstat (limited to 'src/Lib/File.ml')
-rw-r--r--src/Lib/File.ml21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/Lib/File.ml b/src/Lib/File.ml
deleted file mode 100644
index d3597e7..0000000
--- a/src/Lib/File.ml
+++ /dev/null
@@ -1,21 +0,0 @@
-let download filename content =
- let a =
- H.a
- [| HA.href ("data:text/plain;charset=utf-8," ^ URI.encode content)
- ; HA.download filename
- ; HA.style "display:none"
- |]
- [| |]
- in
- let () = Element.append_child Document.body a in
- let () = Element.click a in
- Element.remove_child Document.body a
-
-external reader : unit -> Dom.element = "FileReader"
- [@@bs.new]
-
-external read_as_text : Dom.element -> string -> unit = "readAsText"
- [@@bs.send]
-
-external result : Dom.element -> string = "result"
- [@@bs.get]