abstract class fandoc::DocElem

sys::Obj
  fandoc::DocNode
    fandoc::DocElem

@Js

Source

DocElem is a container node which models a branch of the doc tree.

See pod doc for usage.

add

@Operator
This add(DocNode node)

Source

Add a child to this node. If adding a text node it is automatically merged with the trailing text node (if applicable). If the node is arlready parented thorw ArgErr. Return this.

addAll

This addAll(DocNode[] nodes)

Source

Convenicence to call add for each node in the given list.

addChild

@Deprecated { msg="Use add()" }
This addChild(DocNode node)

Source

anchorId

Str? anchorId

Source

children

DocNode[] children()

Source

Get a readonly list of this elements's children.

htmlName

abstract Str htmlName()

Source

Get the HTML element name to use for this element.

insert

This insert(Int index, DocNode node)

Source

Insert a child node at the specified index. A negative index may be used to access an index from the end of the list. If adding a text node it is automatically merged with surrounding text nodes (if applicable). If the node is already parented throws ArgErr.

isBlock

Bool isBlock()

Source

Is this a block element versus an inline element.

isInline

abstract Bool isInline()

Source

Is this an inline versus a block element.

path

override DocElem[] path()

Source

Covariant override to narrow path to list of DocElem.

remove

This remove(DocNode node)

Source

Remove a child node. If this element is not the child's current parent throw ArgErr. Return this.

removeAll

This removeAll()

Source

Remove all child nodes. Return this.

write

virtual override Void write(DocWriter out)

Source

Write this element and its children to the specified DocWriter.

writeChildren

Void writeChildren(DocWriter out)

Source

Write this element's children to the specified DocWriter.