phoenix_live_view
    Preparing search index...

    Class ReportingBufferInternal

    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 onEnter and onExit and reads BufferFrame.changed.

    Hierarchy (View Summary)

    Index
    diff: any

    The cursor for the subtree this buffer renders.

    frames: BufferFrame[] = []
    html: string = ""
    • get length(): number

      Characters 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.

      Returns number

    • Brackets one entry of a keyed comprehension. Entries hold dynamics without being one themselves, so they are opened separately from enter.

      Parameters

      • index: number

      Returns void

    • 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.

      Returns void

    • Where in the diff the renderer currently is.

      Returns any

    • Parameters

      • diffNode: any
      • key: string | number

      Returns any

    • Parameters

      • attrs: RootAttrs
      • OptionalclearInnerHTML: boolean

      Returns void

    • Brackets 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.

      Parameters

      • node: any
      • index: number
      • statics: string[]

      Returns void

    • Parameters

      • diffNode: any
      • index: number

      Returns any

    • Called 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.

      Parameters

      Returns void

    • Parameters

      Returns void

    • Parameters

      • str: string

      Returns void

    • Called 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.

      Parameters

      • diff: any

      Returns any