Contents

@rrweb/record

0.0.89

Patch Changes

0.0.88

Patch Changes

0.0.87

Patch Changes

  • #4320 837363e Thanks @posthog! - Bound the main-thread cost of the recorder's initial full snapshot, and start measuring it.

    stringifyStylesheet reads cssText for every CSSRule of every stylesheet, all inside the one uninterruptible task that takes the full snapshot. On CSS-heavy pages that is the dominant cost, and it has been observed freezing the UI (no rendering, scrolling, or cursor movement) for seconds. The existing maxDepth guard doesn't help, since it only bounds deep DOMs, not wide ones or heavy CSS.

    Stylesheet inlining now stops after a budget of CSSRules per snapshot (session_recording.inlineStylesheetBudgetRules, default 10,000; set 0 for the previous unbounded behaviour). Sheets past the budget are serialized without _cssText, keeping rel/href so replay can load them remotely, and are then inlined one per idle callback and delivered as attribute mutations. Replay fidelity is preserved; the work is just no longer one long blocking task.

    The snapshot's cost is also now measured and reported on captured events, so slow snapshots are visible without a browser profile: $sdk_debug_replay_slowest_full_snapshot_ms, $sdk_debug_replay_slowest_full_snapshot_stylesheet_ms, $sdk_debug_replay_slowest_full_snapshot_nodes, $sdk_debug_replay_slowest_full_snapshot_css_rules, $sdk_debug_replay_deferred_stylesheets, and, for the incremental path, $sdk_debug_replay_slowest_mutation_batch_ms. (2026-08-05)

  • Updated dependencies [837363e]:

0.0.86

Patch Changes

0.0.85

Patch Changes

0.0.84

Patch Changes

  • #4209 569fc62 Thanks @posthog! - Session recording no longer emits an uncaught TypeError: Illegal invocation from the input observer's synchronous native-setter call. The previous fix only guarded the deferred hooked setter; the synchronous original.set.call(this, value) still ran with a non-native this (a proxy, custom element, or cross-realm object) and threw inside the host page's own assignment. The recorder now probes the native getter — which fails the same internal-slot brand check as the setter — before forwarding: a non-native this is skipped, so the recorder no longer re-throws from its own frame, while genuine elements (including file inputs that legitimately throw on a programmatic value) keep their native behavior. The input event handler and getInputType are similarly guarded against reading native accessors on a non-native this. (2026-07-22)
  • Updated dependencies [569fc62]:

0.0.83

Patch Changes

  • #4157 4a2ecf5 Thanks @posthog! - Session recording no longer emits an uncaught NotAllowedError ("Sharing constructed stylesheets in multiple documents is not allowed") when a page assigns a CSSStyleSheet constructed in a different document to adoptedStyleSheets. That assignment is the host page's own invalid operation, but the recorder's patched setter sat on the call stack, so the exception was attributed to rrweb and churned fingerprints in error tracking. The recorder now contains this specific rejection (matched by its standardized NotAllowedError name, so it works even when the setter throws from an iframe realm) and skips recording those sheets, while still re-throwing any other native-setter error so host-page behaviour is preserved. (2026-07-15)
  • Updated dependencies [4a2ecf5]:

0.0.82

Patch Changes

  • #4151 81adbfd Thanks @posthog! - Session recording no longer emits an uncaught TypeError: Illegal invocation when a programmatic input-value change happens on an object that is not a genuine native input element (for example a proxy on the element prototype chain). The recorder drops that one replay update instead of throwing. (2026-07-15)
  • Updated dependencies [81adbfd]:

0.0.81

Patch Changes

0.0.80

Patch Changes

0.0.79

Patch Changes

  • #4118 f630394 Thanks @posthog! - Fix a RangeError: Maximum call stack size exceeded originating from the shared rrweb patch() helper. It patches shared globals such as Element.prototype.attachShadow (shadow-dom-manager) and the DOM/canvas observers, so multiple recorder instances or repeated start/stop cycles wrap the same global more than once. Previously an out-of-order restore silently no-op'd, leaving the wrapper in the call path; repeated cycles grew the wrapper chain without bound until a real call walked a chain deep enough to overflow the stack. Wrappers now delegate through a mutable per-layer link so any layer can be torn down even when newer wrappers sit on top of it, keeping the chain bounded. Recording behavior is unchanged. This applies the same fix as #4063 (fetch/XHR) to the shared helper so every rrweb-record caller inherits the bounded-chain behavior. (2026-07-10)
  • Updated dependencies [f630394]:

0.0.78

Patch Changes

0.0.77

Patch Changes

0.0.76

Patch Changes

0.0.75

Patch Changes

0.0.74

Patch Changes

0.0.73

Patch Changes

0.0.72

Patch Changes

0.0.71

Patch Changes

0.0.70

Patch Changes

0.0.69

Patch Changes

0.0.68

Patch Changes

0.0.67

Patch Changes

0.0.66

Patch Changes

0.0.65

Patch Changes

0.0.64

Patch Changes

0.0.63

Patch Changes

0.0.62

Patch Changes

  • #3527 33aa019 Thanks @TueHaulund! - Skip canvas snapshot while WebGL context is lost. On mobile under GPU pressure or tab backgrounding, createImageBitmap returns a transparent bitmap rather than throwing for a context-lost WebGL canvas. The worker's first-frame transparency check then suppresses emission and stores the transparent fingerprint in lastFingerprintMap, so once the context restores and three.js re-renders, identical-fingerprint frames get deduped against the transparent baseline and the canvas appears to never record. Pre-flight gl.isContextLost() and skip the snapshot while the context is down. Also wrap the getCanvas() shadow-root walk in try/catch so a traversal exception cannot cancel the rAF loop and silently kill canvas recording for the rest of the session. (2026-05-05)
  • Updated dependencies [33aa019]:

0.0.61

Patch Changes

  • #3510 a5d86c9 Thanks @arnaudhillen! - Move posthog-rrweb sources into the posthog-js monorepo under packages/rrweb/. The seven packages we publish (@posthog/rrweb, @posthog/rrweb-types, @posthog/rrweb-utils, @posthog/rrdom, @posthog/rrweb-snapshot, @posthog/rrweb-record, @posthog/rrweb-plugin-console-record) now release from this repo via the existing changesets pipeline. No runtime behavior changes. (2026-05-05)
  • Updated dependencies [a5d86c9]:

2.0.0-alpha.18

Patch Changes

2.0.0-alpha.17

Patch Changes

2.0.0-alpha.15

Major Changes

  • #1497 2606a2a Thanks @Juice10! - Distributed files have new filenames, paths and extensions. Important: If you reference distributed files or types directly, you might have to update your paths/filenames. E.g. you import from rrweb/typings/... or rrdom/es. However you run import rrweb from '@posthog/rrweb' you won't notice a difference with this change. If you include rrweb files directly in a script tag, you might have to update that path to include a the .umd.cjs files instead. All .js files now use ES modules which can be used in modern browsers, node.js and bundlers that support ES modules. All npm packages now also ship .cjs and .umd.cjs files. The .umd.cjs files are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous .js files). The .cjs files are CommonJS modules that can be used in older Node.js environments. Types should be better defined in package.json and if you need specific types they might be exported from new packages (for example PlayerMachineState and SpeedMachineState are now exported from @rrweb/replay). Check the package.json's main and exports field for the available files.

  • #1497 2606a2a Thanks @Juice10! - Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from rrweb package. Now you can use @rrweb/all, @rrweb/record, and @rrweb/replay packages instead. Check out the README of each package for more information or check out PR #1033 to see the changes.

Patch Changes