rrdom

rrdom is rrweb's virtual DOM implementation: a lightweight, browser-independent model of the document that can apply rrweb events without rendering anything. It exists so recordings can be processed fast and headlessly, in Node.js or in workers, where a real DOM is unavailable or too slow.

How it works

Instead of building actual DOM nodes, rrdom maintains the tree as plain objects that implement enough of the DOM interface for rrweb's rebuild and mutation logic to run against them. The replayer uses it internally to make seeking fast, applying long stretches of events to the virtual tree and committing to the real DOM once. The rrdom-nodejs package takes the same model server-side, which is what enables pipelines that reconstruct page state at any timestamp, extract text or structure, and feed it to analysis or models without a headless browser.

Where you encounter it

Server-side session processing, AI pipelines that need "what did the page contain at second 34" as data, and replay performance internals.