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 eff el. IsElement el => el -> Eff (dom :: DOM | eff) String

#clientHeight Source

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

#clientLeft Source

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

#clientTop Source

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

#clientWidth Source

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

#getAttribute Source

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

#getElementsByClassName Source

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

#getElementsByTagName Source

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

#getElementsByTagNameNS Source

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

#id Source

id :: forall eff el. 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 eff el. IsElement el => String -> el -> Eff (dom :: DOM | eff) Unit

#scrollHeight Source

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

#scrollLeft Source

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

#scrollTop Source

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

#scrollWidth Source

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

#setAttribute Source

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

#setClassName Source

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

#setId Source

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

#setScrollLeft Source

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

#setScrollTop Source

setScrollTop :: forall el eff. 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 n eff. 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 n eff. 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 n eff. 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 n1 n2 n3 eff. 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 n1 n2 eff. 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 n eff. 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 n eff. IsNode n => n -> Eff (dom :: DOM | eff) (Maybe Node)

The parent node of the node.

#parentElement Source

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

The parent element of the node.

#ownerDocument Source

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

#lookupNamespaceURI Source

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

#lastChild Source

lastChild :: forall n eff. 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 n1 n2 eff. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Boolean

Checks whether two nodes are equivalent.

#isDefaultNamespace Source

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

#insertBefore Source

insertBefore :: forall n1 n2 n3 eff. 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 n eff. IsNode n => n -> Eff (dom :: DOM | eff) Boolean

Indicates whether the node has any child nodes.

#firstChild Source

firstChild :: forall n eff. 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 n1 n2 eff. 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 n1 n2 eff. IsNode n1 => IsNode n2 => n1 -> n2 -> Eff (dom :: DOM | eff) Int

Compares the position of two nodes in the document.

#childNodes Source

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

The children of the node.

#baseURI Source

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

The node's base URL.

#appendChild Source

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

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