package bonsai
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A library for building dynamic webapps, using Js_of_ocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb
doc/bonsai.web/Bonsai_web/Rpc_effect/Polling_state_rpc/index.html
Module Rpc_effect.Polling_state_rpcSource
Source
val dispatcher :
?sexp_of_query:('query -> Core.Sexp.t) ->
?sexp_of_response:('response -> Core.Sexp.t) ->
?on_forget_client_error:(Core.Error.t -> unit Bonsai.For_open.Effect.t) ->
('query, 'response) Polling_state_rpc.t ->
where_to_connect:Where_to_connect.t ->
('query ->
'response Core.Or_error.t Bonsai.For_open.Effect.t)
Bonsai.For_open.Computation.tAn effect for dispatching on a particular Polling_state_rpc with a particular query. When the computation is deactivated, it asks the server to cleanup any cached data, so that there is no memory leak. If this cleanup fails, then on_forget_client_error is called with the error.
Source
val babel_dispatcher :
?sexp_of_query:('query -> Core.Sexp.t) ->
?sexp_of_response:('response -> Core.Sexp.t) ->
?on_forget_client_error:(Core.Error.t -> unit Bonsai.For_open.Effect.t) ->
('query, 'response) Versioned_polling_state_rpc.Client.caller ->
where_to_connect:Where_to_connect.t ->
('query ->
'response Core.Or_error.t Bonsai.For_open.Effect.t)
Bonsai.For_open.Computation.tSource
val poll :
?sexp_of_query:('query -> Core.Sexp.t) ->
?sexp_of_response:('response -> Core.Sexp.t) ->
equal_query:('query -> 'query -> bool) ->
?equal_response:('response -> 'response -> bool) ->
?clear_when_deactivated:bool ->
?on_response_received:
('query ->
'response Core.Or_error.t ->
unit Bonsai.For_open.Effect.t)
Bonsai.For_open.Value.t ->
('query, 'response) Polling_state_rpc.t ->
where_to_connect:Where_to_connect.t ->
every:Core.Time_ns.Span.t ->
'query Bonsai.For_open.Value.t ->
('query, 'response) Poll_result.t Bonsai.For_open.Computation.tA computation that periodically dispatches on a polling_state_rpc and keeps track of the most recent response. To explicitly re-send the RPC, schedule the refresh field of the result. It also keeps track of the current query that is in-flight.
Source
val babel_poll :
?sexp_of_query:('query -> Core.Sexp.t) ->
?sexp_of_response:('response -> Core.Sexp.t) ->
equal_query:('query -> 'query -> bool) ->
?equal_response:('response -> 'response -> bool) ->
?clear_when_deactivated:bool ->
?on_response_received:
('query ->
'response Core.Or_error.t ->
unit Bonsai.For_open.Effect.t)
Bonsai.For_open.Value.t ->
('query, 'response) Versioned_polling_state_rpc.Client.caller ->
where_to_connect:Where_to_connect.t ->
every:Core.Time_ns.Span.t ->
'query Bonsai.For_open.Value.t ->
('query, 'response) Poll_result.t Bonsai.For_open.Computation.t sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>