releases.shpreview

Autocapture DOM walk bounded; fetch failures quieter

posthog-js@1.399.5

July 14, 2026PostHog JSView original ↗
1 enhancement1 fixThis release1 enhancementImprovements to existing features1 fixBug fixesAI-tallied from the release notes
From the original release noteView original ↗

1.399.5

Patch Changes

  • #4134 ab10064 Thanks @posthog! - Bound autocapture's DOM ancestor walks against abnormal host-page DOM trees. autocapturePropertiesForElement and shouldCaptureElement now stop climbing the parentNode chain after 1000 ancestors or if they revisit a node (only possible when a page patches parentNode, since native DOMs cannot contain cycles), instead of walking indefinitely. When shouldCaptureElement cannot finish checking ancestors for ph-no-capture/ph-sensitive, it fails closed and reports the element as not capturable. Behavior on normal DOM trees is unchanged. (2026-07-14)

  • #4141 17d956c Thanks @posthog! - Log network-level fetch failures from posthog-js's own request layer (ad blocker, dropped connection, CORS, page teardown) at warn instead of error. The browser rejects these with a generic TypeError (Failed to fetch, Firefox's NetworkError..., or Safari's Load failed); they are already caught and retried by the request queue, so they are expected noise rather than SDK errors — _fetch now gives them the same warn treatment as our own timeout aborts. Genuine, unexpected errors still log at error. (2026-07-14)

Fetched July 14, 2026

Autocapture DOM walk bounded; fetch failures quieter… — releases.sh