Module

DOM.Classy.ParentNode

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

#IsParentNode Source

class IsParentNode n  where

A class for subtypes of ParentNode.

Members

Instances

#children Source

children :: forall eff n. IsParentNode n => n -> Eff (dom :: DOM | eff) HTMLCollection

The child elements for the node.

#firstElementChild Source

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

The first child that is an element, or null if no such element exists.

#lastElementChild Source

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

The last child that is an element, or null if no such element exists.

#childElementCount Source

childElementCount :: forall eff n. IsParentNode n => n -> Eff (dom :: DOM | eff) Int

The number of child elements.

#querySelector Source

querySelector :: forall eff n. IsParentNode n => QuerySelector -> n -> Eff (dom :: DOM | eff) (Maybe Element)

Finds the first child that is an element that matches the selector(s), or null if no such element exists.

#querySelectorAll Source

querySelectorAll :: forall eff n. IsParentNode n => QuerySelector -> n -> Eff (dom :: DOM | eff) NodeList

Finds all the child elements that matches the selector(s).