Module

Web.DOM.Node

#fromEventTarget

#toEventTarget

#nodeType

nodeType :: Partial => Node -> NodeType

The type of a node.

#nodeTypeIndex

nodeTypeIndex :: Node -> Int

The numeric value for the type of a node.

#nodeName

nodeName :: Node -> String

For elements this is the tag name, for document types this is the doctype name, for processing instructions this is the target, for all other nodes it is a string like "#text", `"#comment", etc. depending on the node type.

#baseURI

baseURI :: Node -> Effect String

The node's base URL.

#ownerDocument

ownerDocument :: Node -> Effect (Maybe Document)

The document the node belongs to, unless the node is a document in which case the value is Nothing.

#parentNode

parentNode :: Node -> Effect (Maybe Node)

The parent node of the node.

#parentElement

parentElement :: Node -> Effect (Maybe Element)

The parent element of the node.

#hasChildNodes

hasChildNodes :: Node -> Effect Boolean

Indicates whether the node has any child nodes.

#childNodes

childNodes :: Node -> Effect NodeList

The children of the node.

#firstChild

firstChild :: Node -> Effect (Maybe Node)

The first child of the node, or Nothing if the node has no children.

#lastChild

lastChild :: Node -> Effect (Maybe Node)

The last child of the node, or Nothing if the node has no children.

#previousSibling

previousSibling :: Node -> Effect (Maybe Node)

The previous sibling node, or Nothing if there is no previous sibling.

#nextSibling

nextSibling :: Node -> Effect (Maybe Node)

The next sibling node, or Nothing if there is no next sibling.

#nodeValue

nodeValue :: Node -> Effect (Maybe String)

If the node type is text, comment, or processing instruction this is Just the node's data, or Nothing in all other cases.

#setNodeValue

setNodeValue :: String -> Node -> Effect Unit

If the node type is text, comment, or processing instruction this allows the node's data to be changed, or has no effect in all other cases.

#textContent

textContent :: Node -> Effect String

If the node type is document fragment, element, text, processing instruction, or comment this is the node's data, or null in all other cases.

#setTextContent

setTextContent :: String -> Node -> Effect Unit

If the node type is document fragment, element, text, processing instruction, or comment this allows the node's data to be changed, or has no effect in all other cases.

#normalize

normalize :: Node -> Effect Unit

Removes empty text nodes and then combines any remaining text nodes that are contiguous.

#clone

clone :: Node -> Effect Node

Clones the node without cloning the node's descendants.

#deepClone

deepClone :: Node -> Effect Node

Clones the node and its descendants.

#isEqualNode

isEqualNode :: Node -> Node -> Effect Boolean

Checks whether two nodes are equivalent.

#compareDocumentPositionBits

compareDocumentPositionBits :: Node -> Node -> Effect Int

Compares the position of two nodes in the document.

#contains

contains :: Node -> Node -> Effect Boolean

Checks whether the second node is contained within the first

#lookupPrefix

#lookupNamespaceURI

#isDefaultNamespace

#insertBefore

insertBefore :: Node -> Node -> Node -> Effect Unit

Inserts the first node before the second as a child of the third node.

#appendChild

appendChild :: Node -> Node -> Effect Unit

Appends the first node to the child node list of the second node.

#replaceChild

replaceChild :: Node -> Node -> Node -> Effect Unit

Uses the first node as a replacement for the second node in the children of the third node.

#removeChild

removeChild :: Node -> Node -> Effect Unit

Removes the first node from the children of the second node.

Re-exports from Web.DOM.Internal.Types

#Node

data Node

Modules