Module Dom
module Dom: sig
.. end
DOM binding
This is a partial binding to the DOM Core API.
DOM objects
class type ['a]
nodeList = object
.. end
Specification of NodeList
objects.
type
nodeType =
| |
OTHER |
| |
ELEMENT |
| |
ATTRIBUTE |
| |
TEXT |
| |
CDATA_SECTION |
| |
ENTITY_REFERENCE |
| |
ENTITY |
| |
PROCESSING_INSTRUCTION |
| |
COMMENT |
| |
DOCUMENT |
| |
DOCUMENT_TYPE |
| |
DOCUMENT_FRAGMENT |
| |
NOTATION |
class type node = object
.. end
Specification of Node
objects.
class type tokenList = object
.. end
Specification of TokenList
objects.
class type attr = object
.. end
Specification of Attr
objects.
class type namedNodeMap = object
.. end
Specification of NamedNodeMap
objects.
class type element = object
.. end
Specification of Element
objects.
class type characterData = object
.. end
Specification of CharacterData
objects.
class type text = characterData
Specification of Text
objects.
class type documentFragment = node
Specification of DocumentFragment
objects.
class type ['a]
document = object
.. end
Specification of Document
objects.
Helper functions
val insertBefore : #node Js.t -> #node Js.t -> #node Js.t Js.opt -> unit
insertBefore n c p
inserts node c
as child of node n
,
just before node p
, or as last child if p
is empty.
The expression insertBefore n c p
behave the same as
n##insertBefore(c, p)
but avoid the need of coercing the
different objects to node t
.
val replaceChild : #node Js.t -> #node Js.t -> #node Js.t -> unit
The expression replaceChild n c p
behave the same as
n##replaceChild(c, p)
but avoid the need of coercing the
different objects to node t
.
val removeChild : #node Js.t -> #node Js.t -> unit
The expression removeChild n c
behave the same as
n##removeChild(c)
but avoid the need of coercing the
different objects to node t
.
val appendChild : #node Js.t -> #node Js.t -> unit
The expression appendChild n c
behave the same as
n##appendChild(c)
but avoid the need of coercing the
different objects to node t
.
val list_of_nodeList : 'a nodeList Js.t -> 'a Js.t list
type
node_type =
val nodeType : #node Js.t -> node_type
module CoerceTo: sig
.. end