class

DocNode

@Js
abstract class DocNode : Obj

DocNode is the base class for nodes in a fandoc model. There are two type of nodes: DocElem and DocText.

See pod doc for usage.

fields parent

Get the DocElem that contains this node

methods isFirst

Return true if this node is the first child in its parent

path

Get the path from the root of the DOM to this node

isBlock

Is this a block element versus an inline element

isLast

Return true if this node is the last child in its parent

pos

Get the index of this node in its parent's children

isInline

Is this an inline versus a block node

dump

Debug dump to output stream

id

Get node id for node type

write

Write this node to the specified DocWriter

toText

Get all the DocText children as a string

dump Void dump(OutStream out)

Debug dump to output stream.

id abstract DocNodeId id()

Get node id for node type.

isBlock Bool isBlock()

Is this a block element versus an inline element.

isFirst Bool isFirst()

Return true if this node is the first child in its parent.

isInline abstract Bool isInline()

Is this an inline versus a block node.

isLast Bool isLast()

Return true if this node is the last child in its parent.

parent DocElem? : parent

Get the DocElem that contains this node. Return null if not parented.

path virtual DocNode[] path()

Get the path from the root of the DOM to this node.

pos Int? pos()

Get the index of this node in its parent's children. Return null if not parented.

toText abstract Str toText()

Get all the DocText children as a string

write abstract Void write(DocWriter out)

Write this node to the specified DocWriter.

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