Skip to content

Commit

Permalink
Adapt to Dom_html changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Dec 13, 2024
1 parent e3d3e2e commit d91734c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ depends: [
"yojson" {>= "1.6.0"}
"resource-pooling" {>= "1.0" & < "2.0"}
"cohttp-lwt-unix"
"js_of_ocaml" {>= "5.5.0"}
"js_of_ocaml" {>= "6.0.0"}
"re" {>= "1.7.2"}
]
depexts: [
Expand Down
6 changes: 1 addition & 5 deletions src/os_handlers.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
open%client Eliom_content.Html.F
open%client Js_of_ocaml

let%client storage () =
Js.Optdef.case
Dom_html.window##.localStorage
(fun () -> failwith "Browser storage not supported")
(fun v -> v)
let%client storage () = Dom_html.window##.localStorage

(* Set personal data *)
let%server set_personal_data_handler myid ()
Expand Down
4 changes: 2 additions & 2 deletions src/os_tips.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ let%client display_bubble ?(a = []) ?arrow ?top ?left ?right ?bottom ?height
let%lwt () = Lwt_js.sleep delay in
let box = To_dom.of_element box in
Dom.appendChild parent_node box;
box##.style##.opacity := Js.def (Js.string "0");
box##.style##.opacity := Js.string "0";
Eliom_lib.Option.iter
(fun v -> box##.style##.top := Js.string (Printf.sprintf "%ipx" v))
top;
Expand Down Expand Up @@ -265,7 +265,7 @@ let%client display_bubble ?(a = []) ?arrow ?top ?left ?right ?bottom ?height
bec##.style##.borderLeft := Js.string "none")
arrow;
let%lwt () = Lwt_js_events.request_animation_frame () in
box##.style##.opacity := Js.def (Js.string "1");
box##.style##.opacity := Js.string "1";
Lwt.return_unit

(* Function to be called on server to display a tip *)
Expand Down

0 comments on commit d91734c

Please sign in to comment.