Wrapping

Reading this chapter is not mandatory for writing Eliom applications. However, it is worth reading if you are planning to hack on the Eliom codebase.

Basics

The server side of Eliom can communicates to the client other kind of data than the raw XML contents of the pages. The wrapper mechanism is used to allow the browser side to access to the contents of variables declared on server side. For instance when we write

ignore [%client (Dom_html.window##alert(Js.string ~%text