.TH "Eliom_content.Html5.Manip" 3o 2012-06-11 OCamldoc "" .SH NAME Eliom_content.Html5.Manip \- DOM-like manipulation functions. .SH Module Module Eliom_content.Html5.Manip .SH Documentation .sp Module .BI "Manip" : .B sig end .sp DOM\-like manipulation functions\&. .sp In this module, all the functions apply only to HTML5 element with \&. .sp .sp .sp .sp .I val appendChild : .B ?before:'a Eliom_content.Html5.elt -> .B 'b Eliom_content.Html5.elt -> 'c Eliom_content.Html5.elt -> unit .sp The function .B appendChild e1 e2 inserts the element .B e2 as last child of .B e1 \&. If the optional parameter .B ~before:e3 is present and if .B e3 is a child of .B e1 , then .B e2 is inserted before .B e3 in the list of .B e1 children\&. .sp .sp .I val appendChilds : .B ?before:'a Eliom_content.Html5.elt -> .B 'b Eliom_content.Html5.elt -> 'c Eliom_content.Html5.elt list -> unit .sp The function .B appendChilds e1 elts inserts .B elts as last children of .B e1 \&. If the optional parameter .B ~before:e3 is present and if .B e3 is a child of .B e1 , then .B elts are inserted before .B e3 in the list of .B e1 children\&. .sp .sp .I val removeChild : .B 'a Eliom_content.Html5.elt -> 'b Eliom_content.Html5.elt -> unit .sp The function .B removeChild e1 e2 removes for .B e2 from the list of .B e1 children\&. .sp .sp .I val replaceChild : .B 'a Eliom_content.Html5.elt -> .B 'b Eliom_content.Html5.elt -> 'c Eliom_content.Html5.elt -> unit .sp The function .B replace e1 e2 e3 replaces for .B e2 by .B e3 in the list of .B e1 children\&. .sp .sp .I val removeAllChild : .B 'a Eliom_content.Html5.elt -> unit .sp The function .B removeAllChild e1 removes .B e1 children\&. .sp .sp .I val replaceAllChild : .B 'a Eliom_content.Html5.elt -> 'b Eliom_content.Html5.elt list -> unit .sp The function .B replaceAllChild e1 elts replaces all the children of .B e1 by .B elt \&. .sp .sp .I val addEventListener : .B ?capture:bool -> .B 'a Eliom_content.Html5.elt -> .B (#Dom_html.event as 'b) Js.t Dom_html.Event.typ -> .B ('a Eliom_content.Html5.elt -> 'b Js.t -> bool) -> Dom_html.event_listener_id .sp The function .B addEventListener elt evt handler attach the .B handler for the event .B evt on the element .B elt \&. See the Js_of_ocaml manual, for a list of \&. .sp .sp .I module Named : .B sig end .sp Dom manipulation by element identifier\&. .sp .sp .I val scrollIntoView : .B ?bottom:bool -> 'a Eliom_content.Html5.elt -> unit .sp The function .B scrollIntoView elt scroll the page to a position where .B elt is displayed at the top of the window\&. If the optional parameter .B ~bottom:true is present, the page is scrolled to a position where .B elt is displayed at the bottom of the window\&. .sp .sp .I module Css : .B sig end .sp Read the CSS properties of DOM elements\&. .sp .sp .I module SetCss : .B sig end .sp Modify the CSS properties of DOM elements\&. .sp .sp