You can use dom material manually, but this is not very convenient. The right way is to use Lwt_js_eventsmodules that create an abstraction over event handlers using Lwt.
Here is a minimal example:
Lwt.async (fun () ->
Lwt_js_events.clicks form_submit
(fun _ev _thread -> Lwt.return () )
)
The first parameter is the event object, the second is the loop thread. You can fine-tune the behavior of the handler using the general construction at the beginning.
Lwt.async , " " ( , lwt-). , , .