This is server API (go to client)

Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Ot_spinner

module Ot_spinner : sig..end

Spinner widget


val with_spinner : 
  ?a:[< Html_types.div_attrib ] Eliom_content.Html.attrib list ->
  ?fail:(exn ->
   [< Html_types.div_content ] Eliom_content.Html.elt list Lwt.t) ->
  [< Html_types.div_content ] Eliom_content.Html.elt list Lwt.t ->
  [> `Div ] Eliom_content.Html.elt Lwt.t

On client side, with_spinner th returns immediately a spinner while Lwt thread th is not finished, that will automatically be replaced by the result of th when finished. It has class "spinning" while the spinner is present.

On server side, it will wait for th to be finished before returning its result (and never display a spinner).

If you want the spinner on both sides, you can use with_spinner_no_lwt and Eliom_content.Html.C.node.