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

/src/ocamljs-sanity/main.ml

http://github.com/hhughes/ocaml-frui
OCaml | 10 lines | 8 code | 2 blank | 0 comment | 0 complexity | 36074cc2bc8d7612613ec239540ed82e MD5 | raw file
 1module D = Dom
 2
 3let onload () =
 4  let main = (D.document#getElementById "main" : D.element) in
 5  let text = (D.document#createTextNode "hw_text" : D.text) in
 6  text#_set_data "Hello World!";
 7  ignore (main#appendChild text)
 8;;
 9
10D.window#_set_onload onload