releases.shpreview

Shadow-root observer no longer leaks when iframes removed

posthog-js@1.398.7

July 8, 2026PostHog JSView original ↗
1 fixThis release1 fixBug fixesAI-tallied from the release notes

1.398.7

Patch Changes

  • #4113 45f17ee Thanks @TueHaulund! - fix session replay leaking a shadow-root observer when a same-origin iframe is removed

    Follow-up to the shadow-observer iframe-teardown fix: takeFullSnapshot's onSerialize registers every shadow root with the top-level document, so a root nested in a same-origin iframe was keyed to the wrong document and its observer/buffer were not disconnected when that iframe was removed (they lingered until the next full snapshot). addShadowRoot now derives the owning document from the host element, so per-document teardown matches iframe-nested roots too. (2026-07-08)

Fetched July 8, 2026

Shadow-root observer no longer leaks when iframes removed… — releases.sh