/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
- module D = Dom
- let onload () =
- let main = (D.document#getElementById "main" : D.element) in
- let text = (D.document#createTextNode "hw_text" : D.text) in
- text#_set_data "Hello World!";
- ignore (main#appendChild text)
- ;;
- D.window#_set_onload onload