SelectorTree

interface SelectorTree<N>(source)

How selectors see the nodes of a tree, like the elements of an SVG document or of a user interface: selectors match any tree through this view of it.

Functions

Link copied to clipboard
open fun attribute(node: N, name: String): String?

the value of the attribute name of node, null when it has none

Link copied to clipboard
abstract fun children(node: N): List<N>

the children of node, in order

Link copied to clipboard
abstract fun hasClass(node: N, name: String): Boolean

true when node has the class name

Link copied to clipboard
open fun hasState(node: N, name: String): Boolean

true when node is in the state of the pseudo-class name, like hover, active, focus or disabled

Link copied to clipboard
abstract fun id(node: N): String?

the id of node, null when it has none

Link copied to clipboard
abstract fun parent(node: N): N?

the parent of node, null for the root

Link copied to clipboard
abstract fun type(node: N): String

the type of node, like the name of an element; matched without regard to case