Html.ManipDOM-like manipulation functions.
In this module, all the functions apply only to HTML5 element with <<a_manual chapter="clientserver-html" fragment="unique"|Dom semantics>>
.
appendChild e1 e2 inserts the element e2 as last child of e1. If the optional parameter ~before:e3 is present and if e3 is a child of e1, then e2 is inserted before e3 in the list of e1 children.
appendChildren e1 elts inserts elts as last children of e1. If the optional parameter ~before:e3 is present and if e3 is a child of e1, then elts are inserted before e3 in the list of e1 children.
val childLength : 'a elt -> intchildLength e returns the number of children of e
The function removeChild e1 e2 removes for e2 from the list of e1 children.
The function replace e1 e2 e3 replaces for e2 by e3 in the list of e1 children.
val removeChildren : 'a elt -> unitThe function removeChildren e1 removes e1 children.
val removeSelf : 'a elt -> unitremoveSelf e removes element e from the DOM.
The function replaceChildren e1 elts replaces all the children of e1 by elt.
nextSibling elt returns the next element that has the same parent, if elt is not the last.
previousSibling elt returns the previous element that has the same parent, if elt is not the first.
insertBefore ~before elt insert elt before before.
val addEventListener :
?capture:bool ->
'a elt ->
(Js_of_ocaml.Dom_html.event as 'b) Js_of_ocaml.Js.t
Js_of_ocaml.Dom_html.Event.typ ->
('a elt -> 'b Js_of_ocaml.Js.t -> bool) ->
Js_of_ocaml.Dom_html.event_listener_idThe function addEventListener elt evt handler attach the handler for the event evt on the element elt. See the Js_of_ocaml manual, for a list of <<a_api project="js_of_ocaml"
text="available events"| module Js_of_ocaml.Dom_html.Event >>.
module Named : sig ... endDom manipulation by element identifier.
val scrollIntoView : ?bottom:bool -> 'a elt -> unitThe function scrollIntoView elt scroll the page to a position where elt is displayed at the top of the window. If the optional parameter ~bottom:true is present, the page is scrolled to a position where elt is displayed at the bottom of the window.
module Class : sig ... endmodule Elt : sig ... endmodule Ev : sig ... endmodule Attr : sig ... endmodule Css : sig ... endRead the CSS properties of DOM elements.
module SetCss : sig ... endModify the CSS properties of DOM elements.