a guest Aug 27th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- let a_button =
- let b = Html.D.(button ~a:[a_class ["btn"]] [txt "halli hallo"]) in
- [%client (
- (Lwt.async @@ fun () ->
- let b' = Eliom_content.Html.To_dom.of_button ~%b in
- Lwt_js_events.clicks b'
- (fun _ _ ->
- b'##.innerHTML := (Js.string "GARN");
- Dom_html.window##alert(Js.string ("Garfield!"));
- Lwt.return ());
- ) : unit
RAW Paste Data