Skip to content

DOMImplementation

Types

documentType

A Node containing a doctype. See DocumentType on MDN

type documentType = {
nodeType: int,
nodeName: string,
baseURI: string,
isConnected: bool,
ownerDocument: Null.t<WebAPI.DOM.document>,
parentNode: Null.t<WebAPI.DOMTree.node>,
parentElement: Null.t<WebAPI.DOMTree.htmlElement>,
childNodes: WebAPI.DOM.nodeList<WebAPI.DOMTree.node>,
firstChild: Null.t<WebAPI.DOMTree.node>,
lastChild: Null.t<WebAPI.DOMTree.node>,
previousSibling: Null.t<WebAPI.DOMTree.node>,
nextSibling: Null.t<WebAPI.DOMTree.node>,
mutable nodeValue: Null.t<string>,
mutable textContent: Null.t<string>,
name: string,
publicId: string,
systemId: string,
}

Record fields

nodeType
int

Returns the type of node. Read more on MDN

nodeName
string

Returns a string appropriate for the type of node. Read more on MDN

baseURI
string

Returns node's node document's document base URL. Read more on MDN

isConnected
bool

Returns true if node is connected and false otherwise. Read more on MDN

ownerDocument

Returns the node document. Returns null for documents. Read more on MDN

parentNode

Returns the parent. Read more on MDN

parentElement

Returns the parent element. Read more on MDN

firstChild

Returns the first child. Read more on MDN

lastChild

Returns the last child. Read more on MDN

previousSibling

Returns the previous sibling. Read more on MDN

nextSibling

Returns the next sibling. Read more on MDN

nodeValue
Null.t<string>
textContent
Null.t<string>
publicId
string
systemId
string

t

An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. See DOMImplementation on MDN

type t = private {}

xmlDocument

An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents. See XMLDocument on MDN

type xmlDocument = {}

Values

createDocument

let createDocument: (
t,
~namespace: string,
~qualifiedName: string,
~doctype: documentType=?,
) => xmlDocument

Parameters

tstringstringoption<documentType>

Return type

xmlDocument

createDocumentType

let createDocumentType: (
t,
~qualifiedName: string,
~publicId: string,
~systemId: string,
) => documentType

Parameters

tstringstringstring

Return type

documentType

createHTMLDocument

let createHTMLDocument: (t, ~title: string=?) => WebAPI.DOM.document

Parameters

toption<string>

Return type

WebAPI.DOM.document