package eliom

  1. Overview
  2. Docs
Advanced client/server Web and mobile framework

Install

Dune Dependency

Authors

Maintainers

Sources

11.1.1.tar.gz
md5=c8c67fe5fb8d3f44a3b17cc4a93a0e62
sha512=e58557a1b525efd011e0eb539b112b53e6c012ac3fb2153c251be030eda483dd3b19de625707cf5ffebd97fa6a7fabfb8a6aae8e8a61c79e0bd7ad2d289df9a9

doc/eliom.server/Eliom_react/Up/index.html

Module Eliom_react.UpSource

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") }} ...

Sourcetype 'a t

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.

Sourceval to_react : 'a t -> 'a React.E.t

to_react e injects the up events e into react events so that it can be manipulated as a standard event.

Sourceval 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.

OCaml

Innovation. Community. Security.