ElementNode
Element node — Alloy hook node. localName carries the hook kind
(“group”, “indent”, “line”, “softline”, “ifBreak”, etc).
data carries hook-specific config (e.g. { shouldBreak: false } for
a group). Kept as a single bag rather than a parallel hierarchy of
subclasses to avoid V8 hidden-class fan-out.
Members
Section titled “Members”Extends AlloyNode
| _breakCount | number | Count of unabsorbed break-leaves in this subtree. Maintained by insertBefore / detach so the printer can decide whether a group is broken in O(1) without a prepass walk. breakParent / hardline / hbr / literalline / lbr elements and TextNodes containing \n/\r count as break-leaves; a group element absorbs the count from its own subtree (does not propagate outward). For ifBreak elements the count includes contributions from data.flatNode (the alternate branch is not in the regular tree). |
| constructor | (localName: string, data: unknown) | Constructs a new instance of the ElementNode class |
| protected cloneShallow | () => ElementNode | |
| data | unknown | |
| localName | string | |
| nodeType | 1 |