Skip to content

Instantly share code, notes, and snippets.

@pasberth
Created August 4, 2014 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pasberth/a2f2bbe4acaeb9cd9ac1 to your computer and use it in GitHub Desktop.
Save pasberth/a2f2bbe4acaeb9cd9ac1 to your computer and use it in GitHub Desktop.
<html>
<head>
<title></title>
<script type="text/javascript" src="a.js"></script>
</head>
<body>
</body>
</html>
(* ocamlfind ocamlc -syntax camlp4o -package js_of_ocaml.syntax -package lwt.syntax -package js_of_ocaml -package lwt Lwt_main.cmo -c hello.ml *)
(* ocamlfind ocamlc -package js_of_ocaml -package lwt -linkpkg hello.cmo *)
(* js_of_ocaml a.out *)
let x : unit Lwt.t =
Lwt.bind
(Lwt_js_events.click Dom_html.document)
(fun ev ->
Firebug.console##log (Js.string "1");
Lwt.bind
(Lwt_js_events.click Dom_html.document)
(fun ev -> Firebug.console##log (Js.string "2"); Lwt.return ()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment