SHARE
TWEET

Untitled

a guest Aug 27th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [%%shared
  2.  
  3.   let a_button =
  4.     let b = Html.D.(button ~a:[a_class ["btn"]] [txt "halli hallo"]) in
  5.     [%client (
  6.       (Lwt.async @@ fun () ->
  7.        let b' = Eliom_content.Html.To_dom.of_button ~%b in
  8.        Lwt_js_events.clicks b'
  9.          (fun _ _ ->
  10.             b'##.innerHTML := (Js.string "GARN");
  11.             Dom_html.window##alert(Js.string ("Garfield!"));
  12.             Lwt.return ());
  13.       ) : unit
  14.     )];
  15.     b
  16. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top