diff options
author | Joris | 2022-07-05 21:55:41 +0200 |
---|---|---|
committer | Joris | 2023-01-28 09:35:55 +0100 |
commit | 063d8ef9eaf874a941f4459e831057dd0a1b7ddd (patch) | |
tree | c4a8b27cb8fdb5d1dc26c560c7483c9593f40dac /src/Lib/File.ml | |
parent | 2936f06576997bffe7903ea840df563a408efc21 (diff) |
Rewrite in TSmain
Diffstat (limited to 'src/Lib/File.ml')
-rw-r--r-- | src/Lib/File.ml | 21 |
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] |