InternalProtecteddiffThe cursor for the subtree this buffer renders.
ProtectedframesProtectedhtmlCharacters written so far, counting what an open root was split off from. A buffer that records positions brackets spans with this.
Summed on read rather than tracked on write: only a buffer that records positions ever asks, and tracking it charged every render that never does. Roots nest shallowly, so the walk is short.
Brackets one entry of a keyed comprehension. Entries hold dynamics without
being one themselves, so they are opened separately from enter.
Brackets a root element: everything written in between is a single
element, attrs are added to its start tag, and clearInnerHTML
additionally discards its contents (LiveView skips re-rendering a root
that did not change and reuses what is already in the DOM).
The default isolates the element so it can rewrite it without touching
what came before. A buffer that records positions overrides both, keeping
it continuous and applying its edits at the end instead; length stays
continuous across the pair either way.
ProtectedcurrentWhere in the diff the renderer currently is.
ProtecteddiffOptionalclearInnerHTML: booleanBrackets the dynamic at statics[index] of node. Called around every
dynamic of every render, so the default has to be cheap; see
ReportingBuffer for what a buffer can do with it.
ProtectedkeyedCalled around every dynamic in the tree. A change is reported at every
level, so a dynamic containing a changed one is itself reported as
changed; a buffer that wants to attribute a change to the innermost thing
that changed applies that policy itself, walking frames.
StaticpreCalled before each diff merges into the rendered tree, and skipped entirely by a class that does not define it. Whatever it returns is handed to the constructor of every buffer that renders from that diff.
Anything a class wants to keep from the diff has to be copied here: the merge adopts diff subtrees into the tree and then mutates them.
Not called for the join, which has no previous render to compare against.
The buffer that reports which parts of the page a patch touched. It keeps a copy of each diff before it merges and walks it alongside the tree, so a subclass needs no knowledge of the diff format: it overrides
onEnterandonExitand reads BufferFrame.changed.