PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/frui.ml

http://github.com/hhughes/ocaml-frui
OCaml | 17 lines | 14 code | 3 blank | 0 comment | 0 complexity | 6513de478c34e08f32ff8d2f204b7a12 MD5 | raw file
 1open Logger
 2open Dialog
 3
 4module D = Dom
 5module F = Froc
 6module Fd = Froc_dom
 7
 8let onload () =
 9  debug "onload";
10  let main = (D.document#getElementById "main" : D.element) in
11  let new_dlg = (D.document#createElement "button" : D.button) in
12  ignore (set_text (new_dlg :> D.element) "add dialog");
13  ignore (main#appendChild new_dlg);
14  new_dlg#_set_onclick (fun _ -> ignore (new dialog main ()); true)
15;;
16
17D.window#_set_onload onload