ReadonlychildrenIts children, in paint order before zIndex applies.
ReadonlydA path node's SVG d attribute.
ReadonlykindWhat this node draws.
ReadonlymarkupA text node's content as markup, to be parsed by the renderer.
Set by Text and left undefined by RichText, which is how
the two are told apart on the wire: rich text of one run is otherwise
byte-identical to plain text of one run, and the decoder would have to
guess. Parse everything and RichText can no longer carry a literal <;
parse nothing and a caller gets no rich text at all.
ReadonlynameA name carried through for diagnostics, which the renderer never reads.
ReadonlyparagraphA text node's paragraph properties, which are not style and do not inherit.
Separate from SceneNode.style because the scene keeps them
separate: maxLines and ellipsis describe the block, not the glyphs, and
nothing inherits them from a parent.
ReadonlysegmentsThe runs of a text node, built by the caller and not interpreted.
ReadonlysrcWhere an image node's bytes come from.
ReadonlystyleHow it is styled, or undefined for a node that sets nothing.
One node of the tree.
Every field is present on every node,
undefinedwhere it does not apply, and always in this order. That is not tidiness: a node that sometimes carriessrcand sometimes does not gives V8 two hidden classes for one shape, and every property read in the encoder deoptimises to a megamorphic lookup. One shape, one hidden class, and the encoder's reads stay inline.The factories are the only thing that should build one, for that reason — an object literal written by hand is one key order away from a second class.