File: hello_dom.ml

package info (click to toggle)
obrowser 1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,216 kB
  • ctags: 3,498
  • sloc: ml: 13,505; makefile: 343; sh: 11
file content (5 lines) | stat: -rw-r--r-- 181 bytes parent folder | download | duplicates (2)
1
2
3
4
5
(* We retrieve the DOM Node with the id *)
let cdiv = Js.get_element_by_id Sys.argv.(1) ;;

(* We append a CDATA node into it *)
Js.Node.append cdiv (Js.Node.text "Hello World") ;;