Js_of_ocaml -> calling the translated javascript

You can definitely call Js_of_OCaml code from JavaScript. You just need to wrap it in an exported JS module.
See Export OCaml code to JavaScript.

I haven’t checked, but you will probably have to add conversions from JS arrays to OCaml lists in your OCaml code.

4 Likes