package eliom

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Cross browser dom manipulation functions

class type 'element get_tag = object ... end
val get_body : 'element get_tag Js_of_ocaml.Js.t -> 'element Js_of_ocaml.Js.t
val get_head : 'element get_tag Js_of_ocaml.Js.t -> 'element Js_of_ocaml.Js.t

select_nodes root finds the nodes below root in the page annotated to be: * eliom links * eliom forms * process unique nodes * nodes with closures ( events ) * nodes with attributes

val select_nodes : Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t -> Js_of_ocaml.Dom_html.anchorElement Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t * Js_of_ocaml.Dom_html.formElement Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t * Js_of_ocaml.Dom_html.element Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t * Js_of_ocaml.Dom_html.element Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t * Js_of_ocaml.Dom_html.element Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t
val select_request_nodes : Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t -> Js_of_ocaml.Dom_html.element Js_of_ocaml.Dom.nodeList Js_of_ocaml.Js.t

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

val ancessor : Js_of_ocaml.Dom.node Js_of_ocaml.Js.t -> Js_of_ocaml.Dom.node Js_of_ocaml.Js.t -> bool

ancessor n1 n2 is true if n1 is an ancessor of n2

val createEvent : Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t
val copy_element : Js_of_ocaml.Dom.element Js_of_ocaml.Js.t -> (Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> bool) -> Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t

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

val html_document : Js_of_ocaml.Dom.element Js_of_ocaml.Dom.document Js_of_ocaml.Js.t -> (Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> bool) -> Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t

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

val preload_css : Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t -> unit Lwt.t

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
val iter_attrList : Js_of_ocaml.Dom.attr Js_of_ocaml.Dom.namedNodeMap Js_of_ocaml.Js.t -> (Js_of_ocaml.Dom.attr Js_of_ocaml.Js.t -> unit) -> unit

Window scrolling.

type position = {
  1. html_top : int;
  2. html_left : int;
  3. body_top : int;
  4. body_left : int;
}
val top_position : position
val getDocumentScroll : unit -> position
val setDocumentScroll : position -> unit
val test_pageshow_pagehide : unit -> bool
val onhashchange : (Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> unit) -> unit
OCaml

Innovation. Community. Security.