@rrweb/record
2.2.0 · 24 Oct 2026MIT1.1M / weekRepositoryHomepagenpmAtom feed
11 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
2.2.0
24 Oct 2026Add a top-level annotation event with
record.addAnnotation()andreplayer.on('annotation', handler). Annotation data usestype: 'caption'ortype: 'timelineMarker'. ImportannotationDatafrom@rrweb/typesto type annotation data. The player can display these annotations as captions and interactive timeline markers.Fix record-side memory leaks and duplicate mutation emission:
Disconnect shadow-DOM observers when their host is removed
Each observed shadow root kept a live
MutationObserverplus its mutation buffer for the rest of the recording session even if its host was removed, a memory leak problem for component-heavy pages. Fix: release shadow observers and buffers as soon as we observe them as removed/detached from dom with tests added for the still-attached host-moved case, and to ensure they get re-observed on reinsertion.
Minor Changes
Add a top-level annotation event with
record.addAnnotation()andreplayer.on('annotation', handler). Annotation data usestype: 'caption'ortype: 'timelineMarker'. ImportannotationDatafrom@rrweb/typesto type annotation data. The player can display these annotations as captions and interactive timeline markers.
Patch Changes
Fix record-side memory leaks and duplicate mutation emission:
Stopping a recording now releases the root document's mutation buffer and observer — previously the document observer was only disconnected, so each start/stop cycle leaked one buffer — and removes the cross-origin iframe
messagelistener.A same-origin iframe is observed once instead of re-observed on every full snapshot (
checkoutEveryNth/checkoutEveryNms/manualtakeFullSnapshot), so a single iframe mutation is no longer emitted once per checkout; its observers are also released when the iframe is removed or navigates away.The untainted-
MutationObserverhelper iframe used on WebKit/Safari is reference-counted, so it is torn down only when the last observer stops and will get rebuilt for a later recording.
Disconnect shadow-DOM observers when their host is removed
Each observed shadow root kept a live
MutationObserverplus its mutation buffer for the rest of the recording session even if its host was removed, a memory leak problem for component-heavy pages. Fix: release shadow observers and buffers as soon as we observe them as removed/detached from dom with tests added for the still-attached host-moved case, and to ensure they get re-observed on reinsertion.Release removed shadow trees from the mirror
Removing a shadow host from DOM was leaving references to shadow descendants, so e.g. repeatedly replacing web components mem-leaked their detached trees. Fix by recursing into shadow roots during removal, including nested hosts and releasing strong references from the mirror.
2.1.7
2 Oct 2026Fix #1920 - normalization of '0px' in style sheets caused problems with the styled-components library, which built style elements text element by text element. Bug introduced
Patch Changes
Fix #1920 - normalization of '0px' in style sheets caused problems with the styled-components library, which built style elements text element by text element. Bug introduced
2.1.6
18 Sep 2026Only updates dependencies:rrweb 2.1.6@rrweb/types 2.1.6@rrweb/utils 2.1.6
2.1.5
17 Sep 2026Improve performance of untainted
domaccessors. Since #1509 we use e.g.dom.parentNode(el)instead ofel.parentNodeto work around libraries that modify these accessors. Slight improvement to avoid a string allocation each time one of these is called; they are on every hot path.Improvements in efficiency of mutation handling at record time; has been identified as a problem numerous times
Patch Changes
Improve performance of untainted
domaccessors. Since #1509 we use e.g.dom.parentNode(el)instead ofel.parentNodeto work around libraries that modify these accessors. Slight improvement to avoid a string allocation each time one of these is called; they are on every hot path.Improvements in efficiency of mutation handling at record time; has been identified as a problem numerous times
2.1.2 – 2.1.43 releases that only update dependenciesrrweb 2.1.4@rrweb/types 2.1.4@rrweb/utils 2.1.4Show each
2.1.1
21 Jul 2026Reading the note…
2.1.0
27 Jun 2026Reading the note…
2.0.1
3 Jun 2026Reading the note…
2.0.0
1 Jun 2026Reading the note…