Module Dom_html

module Dom_html : sig..end

DOM HTML binding

This is a partial binding to the DOM HTML API.


CSS style declaration

class type cssStyleDeclaration = object..end

Events

type ('a, 'b) event_listener = ('a, 'b) Dom.event_listener

The type of event listener functions. The first type parameter 'a is the type of the target object; the second parameter 'b is the type of the event object.

type mouse_button =  | No_button | Left_button | Middle_button | Right_button
class type event = object..end
class type mouseEvent = object..end
class type keyboardEvent = object..end
class type mousewheelEvent = object..end
class type mouseScrollEvent = object..end
class type touchEvent = object..end
class type touchList = object..end
class type touch = object..end
class type dragEvent = object..end
class type dataTransfer = object..end
class type eventTarget = object..end

Common properties of event target objects: onclick, onkeypress, ...

class type popStateEvent = object..end
class type storageEvent = object..end
class type storage = object..end

Storage

class type hashChangeEvent = object..end

HTML elements

class type nodeSelector = object..end
class type tokenList = object..end
class type element = object..end

Properties common to all HTML elements

class type clientRect = object..end

Rectangular box (used for element bounding boxes)

class type clientRectList = object..end
class type ['node]collection = object..end

Collection of HTML elements

class type htmlElement = element
class type headElement = object..end
class type linkElement = object..end
class type titleElement = object..end
class type metaElement = object..end
class type baseElement = object..end
class type styleElement = object..end
class type bodyElement = element
class type formElement = object..end
class type optGroupElement = object..end
class type optionElement = object..end
class type selectElement = object..end
class type inputElement = object..end
class type textAreaElement = object..end
class type buttonElement = object..end
class type labelElement = object..end
class type fieldSetElement = object..end
class type legendElement = object..end
class type uListElement = element
class type oListElement = element
class type dListElement = element
class type liElement = element
class type divElement = element
class type paragraphElement = element
class type headingElement = element
class type quoteElement = object..end
class type preElement = element
class type brElement = element
class type hrElement = element
class type modElement = object..end
class type anchorElement = object..end
class type imageElement = object..end
class type objectElement = object..end
class type paramElement = object..end
class type areaElement = object..end
class type mapElement = object..end
class type scriptElement = object..end
class type embedElement = object..end
class type tableCellElement = object..end
class type tableRowElement = object..end
class type tableColElement = object..end
class type tableSectionElement = object..end
class type tableCaptionElement = element
class type tableElement = object..end
class type timeRanges = object..end
type networkState =  | NETWORK_EMPTY | NETWORK_IDLE | NETWORK_LOADING | NETWORK_NO_SOURCE
type readyState =  | HAVE_NOTHING | HAVE_METADATA | HAVE_CURRENT_DATA | HAVE_FUTURE_DATA | HAVE_ENOUGH_DATA
class type mediaElement = object..end
class type audioElement = object..end
class type videoElement = object..end

Canvas object

type context
val _2d_ : context
type canvasPattern
class type canvasElement = object..end
class type canvasRenderingContext2D = object..end
class type canvasGradient = object..end
class type textMetrics = object..end
class type imageData = object..end
class type canvasPixelArray = object..end
val pixel_get : canvasPixelArray Js.t -> int -> int
val pixel_set : canvasPixelArray Js.t -> int -> int -> unit
class type range = object..end

Object representing a range *

class type selection = object..end

Information on current selection

Document objects

class type document = object..end
val document : document Js.t

The current document

val getElementById : string -> element Js.t

getElementById id returns the element with the id id in the current document. It raises Not_found if there are no such element

Window objects

class type location = object..end

Location information

class type history = object..end

Browser history information

class type undoManager = object..end

Undo manager

class type navigator = object..end

Navigator information

class type screen = object..end
class type applicationCache = object..