package bonsai
A library for building dynamic webapps, using Js_of_ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303
doc/bonsai.web/Bonsai_web/Rpc_effect/Poll_result/index.html
Module Rpc_effect.Poll_result
Source
The various rpc polling functions in this module return a Poll_result.t
, containing the current state and some historical state of the RPC.
last_ok_response
contains the most recent query/response pair that completed successfully, even if the RPC has returned errors since then.
last_error
contains the most recent query that produced an error, alongside the error that was returned. Unlike last_ok_response
, this field is set to None
as soon a response completes sucessfully.
inflight_query
is Some
when an a query has been dispatched, but has not completed yet.
refresh
can be used to manually redispatch the rpc
Source
type ('query, 'response) t = {
last_ok_response : ('query * 'response) option;
last_error : ('query * Core.Error.t) option;
inflight_query : 'query option;
refresh : unit Bonsai.For_open.Effect.t;
}
Source
val sexp_of_t :
('query -> Sexplib0.Sexp.t) ->
('response -> Sexplib0.Sexp.t) ->
('query, 'response) t ->
Sexplib0.Sexp.t
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>