diff --git a/opam b/opam index 7e70816f..5250bcf7 100644 --- a/opam +++ b/opam @@ -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: [ diff --git a/src/os_handlers.eliom b/src/os_handlers.eliom index 8a30a238..abab3aeb 100644 --- a/src/os_handlers.eliom +++ b/src/os_handlers.eliom @@ -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 () diff --git a/src/os_tips.eliom b/src/os_tips.eliom index d8c7fc3d..ee430d5d 100644 --- a/src/os_tips.eliom +++ b/src/os_tips.eliom @@ -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; @@ -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 *)