From a1dae0400032aa875093b4e06d3a62e2fd9a9197 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Fri, 28 Jul 2023 00:35:51 +0200 Subject: [PATCH] =?UTF-8?q?fix(ui):=20Use=20proper=20URL=20fragments=20("#?= =?UTF-8?q?tab=3D=E2=80=A6",=20not=20"#tab%3D=E2=80=A6")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related: PR https://github.com/ocsigen/js_of_ocaml/pull/1497 Close #539 --- src/utils/js_utils.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/js_utils.ml b/src/utils/js_utils.ml index 6d0ee3e58..b3e32a1b3 100644 --- a/src/utils/js_utils.ml +++ b/src/utils/js_utils.ml @@ -1201,7 +1201,11 @@ let parse_fragment () = let set_fragment args = let pairs = List.map (fun (n, v) -> n ^ "=" ^ v) args in let fragment = String.concat "&" pairs in - Url.Current.set_fragment fragment + (* TODO: Replace with + {| Url.Current.set_fragment fragment |} + when https://github.com/ocsigen/js_of_ocaml/pull/1497 is shipped + within learn-ocaml's dependencies. *) + Dom_html.window##.location##.hash := Js.bytestring fragment let local_args = ref []