ocsigen-toolkit icon indicating copy to clipboard operation
ocsigen-toolkit copied to clipboard

Ot_spinner: replace num_active_spinner, onloaded, and when_loaded with a spinner returning a Lwt thread waking up when loaded.

Open sagotch opened this issue 8 years ago • 0 comments

(** the number of spinners currently spinning *)
val num_active_spinners : int Eliom_shared.React.S.t
(** [onloaded] is an event that fires when all spinners have finished loading.
    This can occur multiple times. *)
val onloaded : unit Eliom_shared.React.E.t
(** do an action once no spinners are spinning (could be right away) *)
val when_loaded : (unit -> unit) -> unit

Instead of using these functions, which are not firing when we want them to be firing (e.g. the when_loaded event is used to setup form while it actually wait for every spinner to terminate), add a version of the function returning a unit Lwt.t to signal that content has been loaded.

sagotch avatar Apr 05 '17 09:04 sagotch