Major 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. -
#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)
-
#1031
ad9bc3eThanks @Juice10! - Move shared rrweb event and recorder types into the new@rrweb/typespackage. -
#913
74f553aThanks @Yuyz0112! - Move browser-only rrdom features into the newrrdompackage.
Minor Changes
-
#1503
335639aThanks @Juice10! - Support top-layer components. Fixes #1381. -
#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. -
#1000
ce6019dThanks @wfk007! - Add support for recording and replaying mediaplaybackRatechanges. -
#895
de755aeThanks @Juice10! - Add the fast-forward virtual DOM optimization for replay.
Patch Changes
-
#1561
8e55c45Thanks @billyvg! - Ignore invalid DOM attributes when diffing -
#1222
b798f2dThanks @YunFeng0817! - Fix: rrdom bugs- Fix a bug in the diff algorithm.
- Omit the 'srcdoc' attribute of iframes to avoid overwriting content.
-
#1432
123a81eThanks @Juice10! - SupportloopinRRMediaElement -
#1126
227d43aThanks @YunFeng0817! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs #1087. -
#1139
f27e545Thanks @YunFeng0817! - Fix: If RRNode appends a single child twice, children of the node will become an infinite link list. -
#1126
227d43aThanks @YunFeng0817! - Fix: improve rrdom robustness #1091. -
#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 -
#1352
e607e83Thanks @juliecheng! - fix: scrolling may not be applied when fast-forwarding -
#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 -
#995
55ebce7Thanks @YunFeng0817! - Fix replay of delayed inlined stylesheet links by updating the existing link/style node attributes instead of adding a child node, and preserve mirror metadata when replacing rrdom nodes. -
#927
fd85c79Thanks @Juice10! - Fix iframe reload and rrdom diff issues by handling negative and unserialized node ids correctly. -
#944
f1b23ddThanks @YunFeng0817! - Fix fast-forward replay so canvas image data inside iframes is restored when rebuilding through the virtual DOM path. -
#923
a31e272Thanks @Juice10! - Remove children fromDocumentnodes even when the document is not in the mirror. -
#925
01612b7Thanks @YunFeng0817! - Switch CSSOM usage to the rrweb-ownedrrweb-cssompackage. -
Updated dependencies [
47a7c3f,a2c8a1a,40bbc25,22bc4c3,11f6567,123a81e,dc20cd4,3e9e42f,03b5216,46f1b25,cbbd1e5,a6893f7,c28ef5f,335639a,5e7943d,4014305,efdc167,f6f07e9,1385f7a,d7c72bf,f2419f2,c0f83af,e96f668,58c9104,227d43a,bc84246,d2582e9,82f6fec,eac9b18,02cc62d,2606a2a,d0fdc0f,f3cf092,a2be77b,527d9d3,f7c6973,efdc167,a7c33f2,43e4f5b,6f4e691,04ee6ed,5fbb904,d350da8,d08624c,e7f0c80,8aea5b0,314a8dd,5a78938,76df979,7c0dc9d,8e47ca1,07ac5c9,c6600e7,33e01f5,e08706a,be6bf52]:- rrweb-snapshot@2.0.0