Major Changes
-
#1497
2606a2aThanks @Juice10! - Split plugins out of rrweb and move them into their own packages: @rrweb/packer, @rrweb/rrweb-plugin-canvas-webrtc-record, @rrweb/rrweb-plugin-canvas-webrtc-replay, @rrweb/rrweb-plugin-sequential-id-record, @rrweb/rrweb-plugin-sequential-id-replay, @rrweb/rrweb-plugin-console-record, @rrweb/rrweb-plugin-console-replay. Check out the README of each package for more information or check out #1033 to see the changes. -
#1497
2606a2aThanks @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 fromrrweb/typings/...orrrdom/es. However you runimport rrweb from '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.cjsfiles instead. All.jsfiles 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.cjsand.umd.cjsfiles. The.umd.cjsfiles are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous.jsfiles). The.cjsfiles are CommonJS modules that can be used in older Node.js environments. Types should be better defined inpackage.jsonand if you need specific types they might be exported from new packages (for examplePlayerMachineStateandSpeedMachineStateare now exported from@rrweb/replay). Check thepackage.json'smainandexportsfield for the available files. -
#1497
2606a2aThanks @Juice10! - Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files fromrrwebpackage. Now you can use@rrweb/all,@rrweb/record, and@rrweb/replaypackages instead. Check out the README of each package for more information or check out PR #1033 to see the changes. -
#1031
ad9bc3eThanks @Juice10! - Move shared rrweb event and recorder types into the new@rrweb/typespackage. -
#868
e4f680eThanks @Juice10! - RemoveINode/node.__snusage and useMirroras the source of truth. -
#913
74f553aThanks @Yuyz0112! - Move browser-only rrdom features into the newrrdompackage.
Minor Changes
-
#1129
979d2b1Thanks @eoghanmurray! - click events now include a.pointerTypeattribute which distinguishes between 'pen', 'mouse' and 'touch' events. There is no new PenDown/PenUp events, but these can be detected with a MouseDown/MouseUp + pointerType=pen -
#1432
123a81eThanks @Juice10! - Full overhawl ofvideoandaudioelement playback. More robust and fixes lots of bugs related to pausing/playing/skipping/muting/playbackRate etc. -
#1188
bc84246Thanks @benjackwhite! - feat: Extends maskInputFn to pass the HTMLElement to the deciding function -
#1170
d2582e9Thanks @mydea! - feat: Ensure password inputs remain masked when switching input type -
#1107
a225d8eThanks @mydea! - feat: Allow to passerrorHandleras record option -
#1503
335639aThanks @Juice10! - Support top-layer components. Fixes #1381. -
#1310
7c0dc9dThanks @benjackwhite! - Extends maskTextFn to pass the HTMLElement to the deciding function -
#1543
53b83bbThanks @JonasBa! - Optimize isParentRemoved check -
#1035
2a80949Thanks @Juice10! - Add support for recording cross-origin iframes viarecordCrossOriginIframes. -
#989
3809060Thanks @YunFeng0817! - Add support for recording and replaying constructableadoptedStyleSheets, including stylesheet mutations,replace/replaceSync, shadow roots, iframes, live mode, and virtual DOM replay. -
#936
b2d5689Thanks @0jinxing! - Add recording and replay support for text selection events. -
#953
5f59f91Thanks @YunFeng0817! - Add adestroy()method to fully remove a replayer instance and emit a destroy event. -
#976
a8478f1Thanks @Juice10! - Add canvas WebRTC record and replay plugins for live-streaming canvas contents. -
#1000
ce6019dThanks @wfk007! - Add support for recording and replaying mediaplaybackRatechanges. -
#967
bac1d7bThanks @QxQstar! - AdddataURLOptionsto control canvas snapshot image format and quality. -
#894
5ba933cThanks @dbseel! - AddignoreCSSAttributesand applyblockSelectorchecks consistently across recorder observers. -
#859
e238462Thanks @Juice10! - Add support for recording canvas snapshots at a configured FPS. -
#895
de755aeThanks @Juice10! - Add the fast-forward virtual DOM optimization for replay.
Patch Changes
-
#1269
7103625Thanks @eoghanmurray! - Don't include redundant data from text/attribute mutations on just-added nodes -
#1386
a2c8a1aThanks @ababik! - Fix that the optionalmaskInputFnwas being accidentally ignored during the creation of the full snapshot -
#1422
3d1877cThanks @marandaneto! - fix: createImageBitmap throws DOMException if source is 0 width or height -
#1403
af0962cThanks @pauldambra! - safely capture BigInt values with the console log plugin" -
#1327
57a940aThanks @mydea! - fix: Fix checking forpatchTargetininitAdoptedStyleSheetObserver -
#1156
e65465eThanks @Code-Crash! - Fix the statement which is getting changed by Microbundle -
#1268
d872d28Thanks @eoghanmurray! - Compact style mutation fixes and improvements- fixes when style updates contain a 'var()' on a shorthand property #1246
- further ensures that style mutations are compact by reverting to string method if it is shorter
-
#1262
36da39dThanks @billyvg! - feat: AddignoreSelectoroptionSimilar to ignoreClass, but accepts a CSS selector so that you can use any CSS selector.
-
#1198
b5e30cfThanks @charliegracie! - Reset the finished flag in Controllergotoinstead ofhandleProgressClickso that it is properly handled ifgotois called directly. -
#1417
40bbc25Thanks @YunFeng0817! - fix: duplicate textContent for style elements cause incremental style mutations to be invalid -
#1762
22bc4c3Thanks @Juice10! - Drop base64 inlined worker source from all bundles -
#1279
11f6567Thanks @eoghanmurray! - Extend to run fixBrowserCompatibilityIssuesInCSS over inline stylesheets -
#1196
490b3e2Thanks @eoghanmurray! - Guard against presence of older 3rd party javascript libraries which redefine Date.now() -
#1615
dc20cd4Thanks @eoghanmurray! - Improve performance of splitCssText for <style> elements with large css content - see #1603 -
#1640
3e9e42fThanks @eoghanmurray! - Improve performance of splitCssText for <style> elements with large css content - see #1603 -
#1139
f27e545Thanks @YunFeng0817! - Fix: Switch from virtual dom to real dom before rebuilding fullsnapshot -
#1033
7261c43Thanks @Juice10! - ExportReplayPluginfrom rrweb directly. Previously we had to doimport type { ReplayPlugin } from 'rrweb/dist/types';now we can doimport type { ReplayPlugin } from 'rrweb'; -
#1464
03b5216Thanks @colingm! - better support for coexistence with older libraries (e.g. MooTools & Prototype.js) which modify the in-builtArray.fromfunction -
#1441
ae6908dThanks @eoghanmurray! - perf: Avoid an extra function call and object clone during event emission -
#1481
46f1b25Thanks @eoghanmurray! - Fix and test for bug #1457 which was affecting replay of complex tailwind css -
#1179
e0f862bThanks @wfk007! - Fix: #1178 remove warning related to worker_threads while building -
#1476
cbbd1e5Thanks @eoghanmurray! - Fixup for multiple background-clip replacement -
#1600
a6893f7Thanks @eoghanmurray! - #1575 Fix that postcss could fall over when trying to process css content split arbitrarily -
#1155
8aea5b0Thanks @YunFeng0817! - Feat: Add support for replaying :defined pseudo-class of custom elements -
#1186
267e990Thanks @YunFeng0817! - Fix: processed-node-manager is created even in the environment that doesn't need a recorder -
#1527
68076b7Thanks @arredgroup! - Export takeFullSnapshot function for a recording process -
#1340
9c6edfeThanks @mydea! - ref: Avoid unnecessary cloning of objects or arrays -
#1220
a1ec9a2Thanks @wfk007! - perf: optimize performance of the DoubleLinkedList get -
#1515
8059d96Thanks @okejminja! - Added support for deprecated addRule & removeRule methods -
#1829
bfe14c5Thanks @Juice10! - MarkinlineImagesandinlineStylesheetrecord options as deprecated in docs and public types while preserving existing behavior. -
#1468
4014305Thanks @eoghanmurray! - inlineImages: during snapshot avoid adding an event listener for inlining of same-origin images (async listener mutates the snapshot which can be problematic) -
#1287
efdc167Thanks @Juice10! - Upgrade all projects to typescript 4.9.5 -
#1631
88ea2d0Thanks @pauldambra! - Move patch function into @rrweb/utils to improve bundling -
#1489
609b7faThanks @JonasBa! - Optimize performance of isParentRemoved by converting it to an iterative procedure -
#1130
f6f07e9Thanks @AgentWrapper! - Fix: Make relative path detection in stylesheet URLs to detect more types of URL protocols when inlining stylesheets. -
#1383
1e0b273Thanks @daibhin! - export the canvasMutation function -
#1324
1fe39abThanks @BelenLuo-tech! - export eventWithTime for consumption by typescript code -
#1196
490b3e2Thanks @eoghanmurray! - Guard against redefinition of Date.now by third party libraries which are also present on a page alongside rrweb -
#1095
1385f7aThanks @YunFeng0817! - Fix duplicated shadow doms -
#1183
d7c72bfThanks @mydea! - fix: Ensure attributes are lowercased when checking -
#1214
ebcbe8bThanks @wfk007! - perf: optimize the performance of record in processMutation phase -
#1343
05478c3Thanks @mdellanoce! - use WeakMap for faster attributeCursor lookup while processing attribute mutations -
#1695
fc390a9Thanks @YunFeng0817! - fix: rrweb recorder may throw error when stopping recording after an iframe becomes cross-origin -
#1251
bbbfa22Thanks @wfk007! - fix: Resize and MediaInteraction events repeat generated after the iframe appeared -
#1467
e96f668Thanks @eoghanmurray! - Bugfix after #1434 perf improvements: fix that blob urls persist on the shared anchor element and can't be later modified -
#1272
58c9104Thanks @eoghanmurray! - Perf: Avoid creation of intermediary array when iterating over style rules -
#1126
227d43aThanks @YunFeng0817! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs #1087. -
#1184
aa79db7Thanks @mydea! - fix: Ensure getting the type of inputs works -
#1493
82f6fecThanks @eoghanmurray! - Replay: Replace negative lookbehind in regexes from css parser as it causes issues with Safari 16 -
#1311
980a38cThanks @eoghanmurray! - Add 'recordDOM' config option to turn off recording of DOM (making recordings unreplayable). Specialist use case e.g. only heatmap click/scroll recording -
#1145
a82a3b4Thanks @eoghanmurray! - For a mutation which removes a node, reduce the number of spurious warnings to take into account that an anscestor (rather than just a parent) may have been just removed -
#1353
5c27b76Thanks @YunFeng0817! - Fix: some nested cross-origin iframes can't be recorded -
#1775
b149cf3Thanks @alailsonko! - fix: improve nested CSS rule handling and replayer handling of missing rules -
#1351
a2be77bThanks @eoghanmurray! - Don't double-record the values of <textarea>s when they already have some content prefilled #1301 -
#1126
227d43aThanks @YunFeng0817! - Fix: improve rrdom robustness #1091. -
#1837
527d9d3Thanks @Juice10! - Tree-shake replay-onlypostcsscode from the@rrweb/recordbundle. -
#1618
79837acThanks @billyvg! - This fixes an issue where inlined CSS from a remotely loaded<link>does not get applied properly due to object reference mutation. -
#1431
a7c33f2Thanks @eoghanmurray! - Ensure :hover works on replayer, even if a rule is behind a media query
Respect the intent behind max-device-width and min-device-width media queries so that their effects are apparent in the replayer context -
#1834
43e4f5bThanks @Juice10! - Require browserrebuild()calls to target a document created byrebuildIntoSandboxedIframe()orcreateSandboxedIframe()by default. Use these helpers for untrusted replay data, or passUNSAFE_allowUnprotectedRebuild: trueonly when accepting the script-execution risk.rrwebnow marksUNSAFE_replayCanvasrebuilds as an explicit unsafe path because canvas replay adds script permission to the replay iframe. -
#1127
3cc4323Thanks @YunFeng0817! - Refactor: Improve performance by 80% in a super large benchmark case.- Refactor: change the data structure of childNodes from array to linked list
- Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)
-
#1328
d38893fThanks @eoghanmurray! - Refactor to preclude the need for a continuous raf loop running in the background which is related to shadowDom -
#1614
6f4e691Thanks @billyvg! - Change to ignore all link[rel="modulepreload"] instead of including only those withas="script" -
#1295
d7cf8ddThanks @colingm! - Return early for child same origin frames -
#1535
04ee6edThanks @eoghanmurray! - Slight simplification to how we replace :hover after #1458 -
#1437
5fbb904Thanks @eoghanmurray! - Edge case: Provide support for mutations on a <style> element which (unusually) has multiple text nodes -
#1191
1e6f71bThanks @Juice10! - Only apply touch-active styling on flush -
#1512
d08624cThanks @eoghanmurray! - optimisation: skip mask check on leaf elements -
#1432
123a81eThanks @Juice10! - Recordloopon<audio>&<video>elements. -
#1374
314a8ddThanks @andrewpomeroy! - Capture stylesheets designated asrel="preload" -
#1593
5a78938Thanks @daibhin! -NodeTypeenum was moved from rrweb-snapshot to @rrweb/types
The following types where moved from rrweb-snapshot to @rrweb/types:documentNode,documentTypeNode,legacyAttributes,textNode,cdataNode,commentNode,elementNode,serializedNode,serializedNodeWithId,serializedElementNodeWithId,serializedTextNodeWithId,IMirror,INode,mediaAttributes,attributesandDataURLOptions -
#1141
3416c3aThanks @YunFeng0817! - Fix: isCheckout is missed in all fullsnapshot events -
#1157
8e47ca1Thanks @mydea! - fix: Explicitly handlenullattribute values -
#1599
9cd28b7Thanks @eoghanmurray! - #1596 Add masking for innerText mutations on textarea elements -
#1349
07ac5c9Thanks @eoghanmurray! - Snapshot performance when masking text: Avoid the repeated calls toclosestwhen recursing through the DOM -
#1704
33e01f5Thanks @eoghanmurray! - Provide a /umd/ output folder alongside the /dist/ one so that we can serve UMD (Universal Module Definition) files with a .js extension, without upsetting expectations set by package.json that all .js files in /dist/ are modules -
#1445
02f50d2Thanks @daibhin! - fix: protect against missing parentNode -
#1121
502d15dThanks @YunFeng0817! - Fix: outdated ':hover' styles can't be removed from iframes or shadow doms -
#1254
d0fbe23Thanks @mydea! - Handle case whereeventis null/undefined -
#1273
a3de582Thanks @Juice10! - Canvas FPS recording: overridepreserveDrawingBuffer: trueon canvas creation.
Canvas replay: fix flickering canvas elemenrs.
Canvas FPS recording: fix bug that wipes webgl(2) canvas backgrounds while recording. -
#760
e08706aThanks @eoghanmurray! - Add slimDOM option to block animation on <title> tag; enabled when the 'all' value is used for slimDOM -
#1122
8d209a6Thanks @YunFeng0817! - Add missing change logs manually. In the next version, all change logs will be generated automatically.-
a220835#1053 Thanks @Juice10! - Fix: Post message can break cross origin iframe recording. -
7e8dcdb#1063 Thanks @lele0108! - Fix: muted false -> true not being set. -
36b44e1#1042 Thanks @wfk007! - Fix: Failed to execute insertBefore on Node. -
44e92cb#1058 Thanks @mydea! - Handle errors when observing iframes. -
729b8bf#1083 Thanks @Juice10! - Fix: Catch iframe manager & fix formatting issues. -
03821d9#1083 Thanks @eoghanmurray! - Harmonize on a single getWindowScroll -
d08913d#1086 Thanks @YunFeng0817! - Fix: missed adopted style sheets of shadow doms in checkout full snapshot. -
66abe17#1032 Thanks @dbseel! - Fix: isBlocked throws on invalid HTML element. -
57a2e14#1088 Thanks @mydea! - Fix: Guard against missing window.CSSStyleSheet. -
fc82869#1093 Thanks @YunFeng0817! - Fix: cross origin iframe bugs. -
a77e302#1104 Thanks @jlalmes! - [console-plugin] Feat: Record unhandled rejection event. -
25a4f5a#1115 Thanks @Juice10! - Fix: Don't trigger Finish event when in liveMode. -
cb15800#1106 Thanks @mydea! - Fix: Ensure CSS support is checked more robustly. -
0732618#1100 Thanks @YunFeng0817! - Fix: wrong rootId value in special iframes. -
3caa25e#1098 Thanks @eoghanmurray! - Refactor: Don't have requestAnimationFrame looping in background for Live Mode. -
3a26e36#1092 Thanks @YunFeng0817! - Fix: regression of issue: ShadowHost can't be a string (issue 941) -
07d22e7#1111 Thanks @YunFeng0817! - Feat: enable to customize logger in the replayer. -
0627d4d#1109 Thanks @YunFeng0817! - Feat: add option to record on DOMContentLoaded event. -
174b9ac#1112 Thanks @YunFeng0817! - Fix: mutation Failed to execute 'insertBefore' on 'Node': Only one doctype on document allowed. -
5a1e5e9#1119 Thanks @Juice10! - Feat: Automate NPM package releases.
-
-
#1509
be6bf52Thanks @Juice10! - Reverse monkey patch built in methods to support LWC (and other frameworks like angular which monkey patch built in methods). -
#1136
aaabdbdThanks @benjackwhite! - fix: Recursive logging bug with console recording -
#1191
1e6f71bThanks @Juice10! - Trigger mouse movement and hover with mouse up and mouse down events when replayer.pause(...) is called. -
#1763
6388fb5Thanks @wfk007! - fix: wujie monkeypatches ownerDocument -
#1163
4cb4d0eThanks @zhaobosky! - Fix: some websites rebuild imcomplete- Some websites, addedSet in emit function is not empty, but the result converted from Array.from is empty.
- Some websites polyfill classList functions of HTML elements. Their implementation may throw errors and cause the snapshot to fail. I add try-catch statements to make the code robust.
-
#1159
5e6c132Thanks @eoghanmurray! - For users of userTriggeredOnInput setting: also set userTriggered to false on Input attribute modifications; this was previously empty this variant of IncrementalSource.Input -
#1029
fdb7135Thanks @Juice10! - Fix replaying element scroll positions when bothscrollTopandscrollLeftare applied. -
#1037
a9fffb3Thanks @QuentinLowe! - Use the correct document when registering shadow roots inside iframes. -
#1041
1990524Thanks @YunFeng0817! - Fix shadow DOM mutation handling that could enter an infinite loop on some pages. -
#1034
5012b1eThanks @wfk007! - Fix custom events and full snapshots after stopping and restarting recording. -
#1020
7edfefeThanks @YunFeng0817! - Fix recorder crashes when non-shadow-root nodes expose ahostproperty. -
#1016
87aa3b6Thanks @eoghanmurray! - Avoid recording noisy read-only WebGL properties such asisContextLost. -
#1013
20ad416Thanks @eoghanmurray! - Fix WebGL variable tracking when multiple contexts are patched. -
#1012
6f44bb7Thanks @Juice10! - Ensure replay pluginonBuildhooks run for newly appended mutation nodes and top-level rebuilt document nodes. -
#995
55ebce7Thanks @YunFeng0817! - Fix replay of delayed inlined stylesheet links by updating the existing link/style node attributes instead of adding a child node. -
#927
fd85c79Thanks @Juice10! - Fix iframe reload and rrdom diff issues by handling negative and unserialized node ids correctly. -
#952
a0d5373Thanks @YunFeng0817! - Fix errors when replaying selection events during fast-forward playback. -
#966
ac7935eThanks @QxQstar! - Fix FPS-based canvas recording whenblockClassis a regular expression. -
#956
e7fdf53Thanks @YunFeng0817! - Fix recording of multiple children inside a shadow root. -
#991
7be26b0Thanks @QuentinLowe! - Fix input hooks inside iframes by using the iframe document's own window prototypes. -
#998
49d143fThanks @dbseel! - Fix replay timing for mouse move events with empty or missing positions. -
#962
6007266Thanks @wfk007! - Fix recorder restart behavior by resetting internal record functions when recording stops. -
#1002
96b7466Thanks @YunFeng0817! - Fix duplicate shadow DOM recording by avoiding repeated observation of the same shadow root. -
#1003
08ab7abThanks @Juice10! - Fix live mode timer setup to reuse the configured speed and live mode settings. -
#1001
c619a59Thanks @eoghanmurray! - FixaddActionso replay actions added after timer startup take effect without stopping and restarting. -
#938
f3064c1Thanks @lele0108! - Fix SVG<use href="#...">snapshot serialization so local fragment references are preserved instead of converted to absolute URLs. -
#935
8ad4325Thanks @YunFeng0817! - Fix console plugin recording soundefinedvalues are serialized and replay correctly. -
#942
f03504aThanks @YunFeng0817! - Fix recording and replay of polyfilled Shadow DOM from ShadyDOM and@lwc/synthetic-shadow. -
#944
f1b23ddThanks @YunFeng0817! - Fix fast-forward replay so canvas image data inside iframes is restored when rebuilding through the virtual DOM path. -
#867
93fec1fThanks @rahulrelicx! - Fix a mutation edge case when a blocked element class is later unblocked. -
#891
3cdcb8aThanks @dkozlovskyi! - Fix issue #890 in replay/recording behavior. -
#885
69499beThanks @Juice10! - Apply only the latest queued text mutation for better replay behavior and performance. -
#903
058c457Thanks @Juice10! - Speed up snapshotting of many newly added DOM nodes. -
#909
d5d877eThanks @Juice10! - Inline stylesheets when they load so late stylesheet content is captured. -
Updated dependencies [
6db8f71,47a7c3f,0f0a532,a2c8a1a,8e55c45,d872d28,b798f2d,123a81e,40bbc25,22bc4c3,11f6567,123a81e,dc20cd4,3e9e42f,03b5216,46f1b25,cbbd1e5,a6893f7,c28ef5f,335639a,5e7943d,4014305,efdc167,88ea2d0,f6f07e9,979d2b1,1385f7a,d7c72bf,f2419f2,c0f83af,e96f668,58c9104,227d43a,bc84246,d2582e9,82f6fec,eac9b18,02cc62d,2606a2a,d0fdc0f,f3cf092,a2be77b,f27e545,227d43a,527d9d3,f7c6973,efdc167,a7c33f2,43e4f5b,3cc4323,6f4e691,335639a,123a81e,04ee6ed,5fbb904,d350da8,d08624c,e7f0c80,8aea5b0,314a8dd,5a78938,e607e83,76df979,7c0dc9d,8e47ca1,07ac5c9,c6600e7,33e01f5,e08706a,be6bf52,6388fb5,c278d06]:- @rrweb/utils@2.0.0
- rrweb-snapshot@2.0.0
- @rrweb/types@2.0.0
- rrdom@2.0.0