1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
open Js_of_ocaml let () = Worker.import_scripts [ "viz.js" ; "full.render.js" ] let () = Worker.set_onmessage (fun content -> let (viz: Process.viz Js.t Js.constr) = Js.Unsafe.global##._Viz in let _ = Process.do_action (new%js viz) content in () )