List of exercices to learn how to use js_of_ocaml.
From Ocsigen website:
Js_of_ocaml is a compiler of OCaml bytecode to Javascript. It makes it possible
to run Ocaml programs in a Web browser.
and from the Wikipedia page describing the Ocsigen project:
A Javascript compilator from OCaml to Javascript named js_of_ocaml. It makes it
possible to run OCaml programs in a Web browser, with portability and without
having to install anything. The compilator takes as input language an OCaml
bytecode, that is a compiled OCaml program. It allows you to use existing OCaml
libraries whose source code isn't available.
This repository contains a list of exercices to teach you how to use js_of_ocaml.
After learning how to compile an ocaml file into a Javascript file, a Makefile will be available for each next exercices (see this repository). An explanation will be given in the same exercice where you learn how to compile ocaml into js.
- Ex00: Compile your ml files into Javascript scripts.
- Ex01: Modify the title of an HTML page.
- Ex02: An alert box with Hello world.
- Ex03: Show a confirm box and get response.
- Ex04: Add dynamically html nodes such as paragraph or div.
- Ex05: Create the Materialize Starter Template in OCaml.
- Ex06: Event handler: execute code when page is loaded.