diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-02-04 21:14:01 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 14:37:57 +0100 |
commit | 86ec559f913c389e8dc055b494630f21a45e039b (patch) | |
tree | 822341b481695c9bf8b39f8b8fcbdeef56e629d6 /script.it | |
parent | 03f8a08fe2dde9db9fb656dbea2e5494b67236ad (diff) |
css_merge application
Diffstat (limited to 'script.it')
-rwxr-xr-x | script.it/state.ml | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/script.it/state.ml b/script.it/state.ml index ad7abb3..cb5d9ff 100755 --- a/script.it/state.ml +++ b/script.it/state.ml @@ -357,20 +357,10 @@ let do_action )) in let content = El.prop Elements.Prop.outerHTML svg in - - let btoa = Jv.get Jv.global "btoa" in - let base64data = Jv.apply btoa - [| Jv.of_jstr content |] in - - (* Create the link to download the the element, and simulate a click on it *) - let a = El.a - ~at:At.[ - href Jstr.( (v "data:image/svg+xml;base64,") + (Jv.Id.of_jv base64data)) - ; v (Jstr.v "download") (Jstr.v "out.svg") - ] - [] in - El.click a - ); + Elements.Transfert.send + ~mime_type:(Jstr.v "image/svg+xml") + ~filename:(Jstr.v "out.svg") + content); state | `Angle value , _ -> |