Module Jsutil

module Jsutil: sig .. end
General Javascript utilities

val doc : Dom_html.document Js.t
The Document
val get_classname : #Dom_html.element Js.t -> string
Get an element's class name
val set_classname : #Dom_html.element Js.t -> string option -> unit
Set an element's class name; pass None for none.
val table : string option -> Dom_html.tableElement Js.t
Create a table with a given class name
val textNode : string -> Dom.text Js.t
Create a text node with the given text
val addTd : Dom_html.tableElement Js.t -> string -> string option -> unit
Add a td to a table, with text content and a class name
val getElementById_exn : string -> Dom_html.element Js.t
Get an element with an id, or raise failure
val getAttribute_exn : #Dom_html.element Js.t -> string -> string
Get an element's attribute, or raise Not_found
val child_elements : #Dom_html.element Js.t -> Dom_html.element Js.t list
Get the children of an element
exception Not_text
Raised by text_of
exception No_children
val text_of : #Dom.node Js.t -> string
Used for getting the raw text of DOM nodes containing entries or outcomes.
val offset_of : Dom_html.element Js.t -> int
Get the y offset of an element. Used for scrolling to an element's position
val delete_children : #Dom.node Js.t -> unit
Delete the children of a Dom node