package eliom
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=4ed25da253920c4d30672c52daae8c86
sha512=c5a0ff26c3b605e9807ba37b0f0c98f05af763c585a42621412dae59589fea8ffa9aa279d4af5e59a3a20a01f955f1e9d035ad6d63cd25bb309fec3ab5514929
doc/eliom.server/Eliom_react/Up/index.html
Module Eliom_react.Up
Source
Event from client to server.
Up events are quite different from Down events. Because of the asymmetrical nature of web programming and because of the reactive model used, an Up event must be created on the server and wrapped into a callback (or something the client can build a callback with).
Example of use: let e_up = Eliom_react.Up.create (Eliom_parameter.ocaml "a" [%json: string]) in ... {{ ignore ( %e_up "A") }} ...
The type of events that, while being "on the server", are triggered by clients. On the server such an event is /primitive/ (hence the create
function) whereas it is /effect-full/ on the client.
to_react e
injects the up events e
into react events so that it can be manipulated as a standard event.
val create :
?scope:Eliom_common.scope ->
?name:string ->
('a,
[ `WithoutSuffix ],
[ `One of 'a Eliom_parameter.ocaml ] Eliom_parameter.param_name)
Eliom_parameter.params_type ->
'a t
create param
creates an Up event. If ~name
is present, the coservice used to transmit the event will always have the same name, even if the server is restarted. ~scope
describes the visibility of the event. By default, it is `Site
if it is called during initialisation, `Client_process
otherwise.