class

TreeNode

@Js
abstract class TreeNode : Obj

TreeNode models a node in a Tree.

See also: docDomkit

fields parent

Parent node of this node, or null if this node is a root

methods isExpanded

Is this node expanded?

children

Get the children of this node

hasChildren

Return true if this has or might have children

onElem

Callback to customize Elem for this node

children virtual TreeNode[] children()

Get the children of this node. If no children return an empty list. Default behavior is no children. This method must return the same instances when called.

hasChildren virtual Bool hasChildren()

Return true if this has or might have children. This is an optimization to display an expansion control without actually loading all the children. The default returns !children.isEmpty.

isExpanded Bool isExpanded()

Is this node expanded?

onElem abstract Void onElem(Elem elem, TreeFlags flags)

Callback to customize Elem for this node.

parent TreeNode? : parent

Parent node of this node, or null if this node is a root.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST