@@ -151,7 +151,8 @@ let%client reset_tips () =
151151(* Returns a block containing a tip,
152152 if it has not already been seen by the user. *)
153153let % shared block ?(a = [] ) ?(recipient = `All )
154- ?(onclose = [% client (fun () -> () : unit -> unit )]) ~name ~content () =
154+ ?(onclose = [% client (fun () -> Lwt. return_unit : unit -> unit Lwt. t)])
155+ ~name ~content () =
155156 let myid_o = Os_current_user.Opt. get_current_userid () in
156157 match recipient, myid_o with
157158 | `All , _
@@ -164,7 +165,7 @@ let%shared block ?(a = []) ?(recipient = `All)
164165 let box_ref = ref None in
165166 let close : (unit -> unit Lwt.t) Eliom_client_value.t =
166167 [% client (fun () ->
167- ~% onclose () ;
168+ let % lwt () = ~% onclose () in
168169 let () = match ! (~% box_ref) with
169170 | Some x -> Manip. removeSelf x
170171 | None -> () in
@@ -204,7 +205,7 @@ let%client () = Eliom_client.onchangepage onchangepage_handler
204205(* Display a tip bubble *)
205206let % client display_bubble ?(a = [] )
206207 ?arrow ?top ?left ?right ?bottom ?height ?width
207- ?(parent_node : _ elt option ) ?(delay = 0.0 ) ?(onclose = fun () -> () )
208+ ?(parent_node : _ elt option ) ?(delay = 0.0 ) ?(onclose = fun () -> Lwt. return_unit )
208209 ~name ~content ()
209210 =
210211 let current_waiter = ! waiter in
@@ -214,7 +215,7 @@ let%client display_bubble ?(a = [])
214215 let bec = D. div ~a: [a_class [" os-tip-bec" ]] [] in
215216 let box_ref = ref None in
216217 let close = fun () ->
217- onclose () ;
218+ let % lwt () = onclose () in
218219 let () = match ! box_ref with
219220 | Some x -> Manip. removeSelf x
220221 | None -> () in
@@ -315,7 +316,7 @@ let%shared bubble
315316 Eliom_client_value.t)
316317 () =
317318 let delay : float option = delay in
318- let onclose : (unit -> unit) Eliom_client_value.t option = onclose in
319+ let onclose : (unit -> unit Lwt.t ) Eliom_client_value.t option = onclose in
319320 let myid_o = Os_current_user.Opt.get_current_userid () in
320321 match recipient, myid_o with
321322 | `All, _
0 commit comments