Expand description
Per-tab element reference table.
A ref (e1, e2, …) is a short, agent-facing handle for a DOM node
discovered through an accessibility snapshot or browser_find. Each ref
maps to a CDP backendDOMNodeId, which is what DOM.* and Input.*
accept directly, so a ref-based click never has to re-resolve a CSS
selector.
Refs are stable for the lifetime of a document: taking a second
snapshot of the same page reuses the existing ref for a node that was
already interned, and only allocates new numbers for nodes that appear
for the first time. A navigation replaces the whole table (the document
token — the Document node’s backendDOMNodeId — changes), so refs from
the previous page are reported as stale instead of silently hitting a
recycled node id.