Skip to content

rrdom

Overview

rrdom is a virtual dom library that is used by rrweb to replay DOM mutations. It is a standalone library that can be used to create a virtual dom tree and apply patches to the real dom. It's used in rrweb to optimize replay performance especially when seeking.

See the guide for more info on rrweb.

Edit README on GitHub

Release Notes for rrdom

2.1.1

Patch Changes

  • Updated dependencies []:
    • rrweb-snapshot@2.1.1

2.1.0

Patch Changes

  • Updated dependencies [b08a06f]:
    • rrweb-snapshot@2.1.0

2.0.1

Patch Changes

  • Updated dependencies [5f52d63]:
    • rrweb-snapshot@2.0.1

2.0.0

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 '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.

  • #1127 3cc4323 Thanks @YunFeng0817! - Refactor: Improve performance by 80% in a super large benchmark case.

    1. Refactor: change the data structure of childNodes from array to linked list
    2. Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)
  • #1031 ad9bc3e Thanks @Juice10! - Move shared rrweb event and recorder types into the new @rrweb/types package.

  • #913 74f553a Thanks @Yuyz0112! - Move browser-only rrdom features into the new rrdom package.

Minor Changes

  • #1503 335639a Thanks @Juice10! - Support top-layer <dialog> components. Fixes #1381.

  • #1035 2a80949 Thanks @Juice10! - Add support for recording cross-origin iframes via recordCrossOriginIframes.

  • #989 3809060 Thanks @YunFeng0817! - Add support for recording and replaying constructable adoptedStyleSheets, including stylesheet mutations, replace/replaceSync, shadow roots, iframes, live mode, and virtual DOM replay.

  • #1000 ce6019d Thanks @wfk007! - Add support for recording and replaying media playbackRate changes.

  • #895 de755ae Thanks @Juice10! - Add the fast-forward virtual DOM optimization for replay.

Patch Changes

2.0.0-alpha.20

Patch Changes

  • Updated dependencies []:
    • rrweb-snapshot@2.0.0-alpha.20

2.0.0-alpha.19

Patch Changes

2.0.0-alpha.18

Patch Changes

  • #1561 8e55c45 Thanks @billyvg! - Ignore invalid DOM attributes when diffing

  • #1593 5a78938 Thanks @daibhin! - NodeType enum 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, attributes and DataURLOptions

  • Updated dependencies [02cc62d, 04ee6ed, 5fbb904, 5a78938]:

    • rrweb-snapshot@2.0.0-alpha.18

2.0.0-alpha.17

Minor Changes

Patch Changes

2.0.0-alpha.16

Patch Changes

  • Updated dependencies [a2c8a1a, d08624c]:
    • rrweb-snapshot@2.0.0-alpha.16

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 '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.

Patch Changes

2.0.0-alpha.14

Patch Changes

2.0.0-alpha.13

Patch Changes

2.0.0-alpha.12

Patch Changes

2.0.0-alpha.11

Patch Changes

2.0.0-alpha.10

Patch Changes

  • Updated dependencies [c6600e7]:
    • rrweb-snapshot@2.0.0-alpha.10

2.0.0-alpha.9

Patch Changes

  • #1222 b798f2d Thanks @YunFeng0817! - Fix: rrdom bugs

    1. Fix a bug in the diff algorithm.
    2. Omit the 'srcdoc' attribute of iframes to avoid overwriting content.
  • Updated dependencies [d7c72bf]:

    • rrweb-snapshot@2.0.0-alpha.9

2.0.0-alpha.8

Patch Changes

2.0.0-alpha.7

Patch Changes

2.0.0-alpha.6

Patch Changes

2.0.0-alpha.5

Major Changes

  • #1127 3cc4323 Thanks @YunFeng0817! - Refactor: Improve performance by 80% in a super large benchmark case.

    1. Refactor: change the data structure of childNodes from array to linked list
    2. Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)

Patch Changes