Module

DOM.Classy.Element

Package
purescript-dom-classy
Repository
garyb/purescript-dom-classy

#IsElement Source

class (IsNode e) <= IsElement e  where

A class for subtypes of Element.

Members

Instances

#className Source

className :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) String

#clientHeight Source

clientHeight :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#clientLeft Source

clientLeft :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#clientTop Source

clientTop :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#clientWidth Source

clientWidth :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#getAttribute Source

getAttribute :: forall el eff. IsElement el => String -> el -> Eff (dom :: DOM | eff) (Maybe String)

#getElementsByClassName Source

getElementsByClassName :: forall el eff. IsElement el => String -> el -> Eff (dom :: DOM | eff) HTMLCollection

#getElementsByTagName Source

getElementsByTagName :: forall el eff. IsElement el => String -> el -> Eff (dom :: DOM | eff) HTMLCollection

#getElementsByTagNameNS Source

getElementsByTagNameNS :: forall el eff. IsElement el => Maybe String -> String -> el -> Eff (dom :: DOM | eff) HTMLCollection

#id Source

id :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) ElementId

#localName Source

localName :: forall el. IsElement el => el -> String

#namespaceURI Source

namespaceURI :: forall el. IsElement el => el -> Maybe String

#prefix Source

prefix :: forall el. IsElement el => el -> Maybe String

#removeAttribute Source

removeAttribute :: forall el eff. IsElement el => String -> el -> Eff (dom :: DOM | eff) Unit

#scrollHeight Source

scrollHeight :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#scrollLeft Source

scrollLeft :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#scrollTop Source

scrollTop :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#scrollWidth Source

scrollWidth :: forall el eff. IsElement el => el -> Eff (dom :: DOM | eff) Number

#setAttribute Source

setAttribute :: forall el eff. IsElement el => String -> String -> el -> Eff (dom :: DOM | eff) Unit

#setClassName Source

setClassName :: forall el eff. IsElement el => String -> el -> Eff (dom :: DOM | eff) Unit

#setId Source

setId :: forall el eff. IsElement el => ElementId -> el -> Eff (dom :: DOM | eff) Unit

#setScrollLeft Source

setScrollLeft :: forall eff el. IsElement el => Number -> el -> Eff (dom :: DOM | eff) Unit

#setScrollTop Source

setScrollTop :: forall eff el. IsElement el => Number -> el -> Eff (dom :: DOM | eff) Unit

#tagName Source

tagName :: forall el. IsElement el => el -> String

Re-exports from DOM.Classy.Node

#textContent Source

textContent :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) 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 Source

setTextContent :: forall eff n. IsNode n => String -> n -> Eff (dom :: DOM | eff) 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.

#setNodeValue Source

setNodeValue :: forall eff n. IsNode n => String -> n -> Eff (dom :: DOM | eff) 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.

#replaceChild Source

replaceChild :: forall eff n3 n2 n1. IsNode n1 => IsNode n2 => IsNode n3 => n1 -> n2 -> n3 -> Eff (dom :: DOM | eff) Node

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

#removeChild Source

removeChild :: forall eff n2 n1. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Node

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

#previousSibling Source

previousSibling :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Node)

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

#parentNode Source

parentNode :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Node)

The parent node of the node.

#parentElement Source

parentElement :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Element)

The parent element of the node.

#ownerDocument Source

ownerDocument :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Document)

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

#normalize Source

normalize :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) Unit

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

#nodeValue Source

nodeValue :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) String

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

#nodeTypeIndex Source

nodeTypeIndex :: forall n. IsNode n => n -> Int

The numeric value for the type of a node.

#nodeType Source

nodeType :: forall n. Partial => IsNode n => n -> NodeType

The type of a node.

#nodeName Source

nodeName :: forall n. IsNode n => n -> 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.

#nextSibling Source

nextSibling :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Node)

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

#lookupPrefix Source

lookupPrefix :: forall eff n. IsNode n => String -> n -> Eff (dom :: DOM | eff) (Maybe String)

#lookupNamespaceURI Source

lookupNamespaceURI :: forall eff n. IsNode n => String -> n -> Eff (dom :: DOM | eff) (Maybe String)

#lastChild Source

lastChild :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Node)

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

#isEqualNode Source

isEqualNode :: forall eff n2 n1. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Boolean

Checks whether two nodes are equivalent.

#isDefaultNamespace Source

isDefaultNamespace :: forall eff n. IsNode n => String -> n -> Eff (dom :: DOM | eff) Boolean

#insertBefore Source

insertBefore :: forall eff n3 n2 n1. IsNode n1 => IsNode n2 => IsNode n3 => n1 -> n2 -> n3 -> Eff (dom :: DOM | eff) Node

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

#hasChildNodes Source

hasChildNodes :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) Boolean

Indicates whether the node has any child nodes.

#firstChild Source

firstChild :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Node)

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

#contains Source

contains :: forall eff n2 n1. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Boolean

Checks whether the second node is contained within the first

#compareDocumentPositionBits Source

compareDocumentPositionBits :: forall eff n2 n1. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Int

Compares the position of two nodes in the document.

#childNodes Source

childNodes :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) NodeList

The children of the node.

#baseURI Source

baseURI :: forall eff n. IsNode n => n -> Eff (dom :: DOM | eff) String

The node's base URL.

#appendChild Source

appendChild :: forall eff n2 n1. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Node

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