ChildSlotRenderObject.between constructor

ChildSlotRenderObject.between(
  1. DomRenderObject parent,
  2. Node start,
  3. Node end
)

Creates a slot that renders its children between the sibling nodes start and end, hydrating the nodes already between them.

Implementation

ChildSlotRenderObject.between(DomRenderObject parent, web.Node start, web.Node end) : node = start.parentElement! {
  this.parent = parent;
  toHydrate = [];
  web.Node? curr = start.nextSibling;
  while (curr != null && curr != end) {
    toHydrate.add(curr);
    curr = curr.nextSibling;
  }
  // Place the children after the start node, even if the slot is empty.
  _beforeStart = start;
}