Module Eliom.Mod_dom

Cross browser dom manipulation functions

select_nodes root finds the nodes below root annotated by Eliom.

select_request_nodes root finds the nodes below root in the page annotated to be: * request unique nodes

ancestor n1 n2 is true if n1 is an ancestor of n2

copy_element e creates recursively a fresh html from any xml element avoiding browser bugs

Assuming d has a body and head element, html_document d will return the same document as html

preload_css e downloads every css included in every link elements that is a descendant of e and replace it and its linked css by inline <style> elements

val iter_nodeList : 'a Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t -> ('a Js_of_ocaml.Js.t -> unit) -> unit

Window scrolling.

type position = {
  1. html_top : float;
  2. html_left : float;
  3. body_top : float;
  4. body_left : float;
}
val position_of_json : Deriving_Json_lexer.lexbuf -> position
val position_to_json : Buffer.t -> position -> unit
val position_json : position Deriving_Json.t
val top_position : position
val getDocumentScroll : unit -> position
val setDocumentScroll : position -> unit