Part of #277
The JS adapters register the collector through BiDi
script.addPreloadScript with no browsing-context id, so every document
instruments itself before any of its own script runs. Python appends a script tag
after the fact, which is exactly the race class core/bidi-preload.ts exists to
remove. Measured on the JS side: 29 of 29 input events and 4 of 4 DOM anchors with
the preload, against 21 of 29 and 3 of 4 without.
Acceptance criteria
The collector is registered per session as a
document-start preload when webSocketUrl is present. The script-tag path remains
as the no-BiDi fallback, gated on a preloadRegistered flag. Measured on the
example: every document anchored, and no row replaying another document's DOM.
Part of #277
The JS adapters register the collector through BiDi
script.addPreloadScriptwith no browsing-context id, so every documentinstruments itself before any of its own script runs. Python appends a script tag
after the fact, which is exactly the race class
core/bidi-preload.tsexists toremove. Measured on the JS side: 29 of 29 input events and 4 of 4 DOM anchors with
the preload, against 21 of 29 and 3 of 4 without.
Acceptance criteria
The collector is registered per session as a
document-start preload when
webSocketUrlis present. The script-tag path remainsas the no-BiDi fallback, gated on a
preloadRegisteredflag. Measured on theexample: every document anchored, and no row replaying another document's DOM.