Nodes are removed from the document but kept in a JS array.
Detached in constructor listDetached HTMLDivElement count risesDetached Text or Detached Span may appearArray → detached nodeElements are created, briefly attached, then removed from the DOM. Something in JavaScript still holds a reference to them.
Each tick creates a div, removes it from the sandbox, but pushes it into detachedNodes. The array keeps the subtree alive.
// Fix: clear the array when nodes are no longer needed detachedNodes.length = 0; // Or use WeakRef if you need non-owning references