diff options
Diffstat (limited to 'src/Lib/File.ml')
-rw-r--r-- | src/Lib/File.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Lib/File.ml b/src/Lib/File.ml index 0089001..d3597e7 100644 --- a/src/Lib/File.ml +++ b/src/Lib/File.ml @@ -10,3 +10,12 @@ let download filename content = 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] |