.TH "Eliom_react.Up" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_react.Up \- Event from client to server. .SH Module Module Eliom_react.Up .SH Documentation .sp Module .BI "Up" : .B sig end .sp Event from client to server\&. .sp .sp .sp .sp .PP .B === Up events are quite different from Down events\&. Because of the .B asymmetrical nature of web programming and because of the reactive model .B used, an Up event must be created on the server and wrapped into a .B callback (or something the client can build a callback with)\&. .B .B Example of use: .B let e_up = Eliom_react\&.Up\&.create .B (Eliom_parameter\&.ocaml "a" Json\&.t) .B in .B \&.\&.\&. {{ ignore ( %e_up "A") }} \&.\&.\&. .B === .PP .I type .B 'a .I t .sp The type of events that, while being "on the server", are triggered by clients\&. On the server such an event is /primitive/ (hence the .B create function) whereas it is /effect\-full/ on the client\&. .sp .sp .I val to_react : .B 'a t -> 'a React.E.t .sp .B to_react e injects the up events .B e into react events so that it can be manipulated as a standard event\&. .sp .sp .I val create : .B ?scope:Eliom_common.scope -> .B ?name:string -> .B ('a, [ `WithoutSuffix ], .B [ `One of 'a Eliom_parameter.ocaml ] Eliom_parameter.param_name) .B Eliom_parameter.params_type -> 'a t .sp .B create param creates an Up event\&. If .B ~name is present, the coservice used to transmit the event will always have the same name, even if the server is restarted\&. .B ~scope describes the visibility of the event\&. By default, it is .B `Site if it is called during initialisation, .B `Client_process otherwise\&. .sp .sp