Reputation: 11588
In the following code, I try to handle a click event on a checkbox. I expect to see the word "hello" printed in the javascript console, but instead I see nothing. How can I modify the code to get the print statement to execute?
let checkGroupByRounds = Dom_html.createInput ~_type:(Js.string "checkbox") doc in
Lwt_js_events.clicks checkGroupByRounds (fun event event_loop ->
Lwt.return (Printf.printf "hello"));
Dom.appendChild container checkGroupByRounds;
Upvotes: 0
Views: 210
Reputation: 241
You need to flush the standard output with a new line Printf.printf "hello\n"
or an explicit flush flush stdout
.
Upvotes: 1