MCPcopy
hub / github.com/rrweb-io/rrweb / diff

Function diff

packages/rrdom/src/diff.ts:104–121  ·  view source on GitHub ↗
(
  oldTree: Node,
  newTree: IRRNode,
  replayer: ReplayerHandler,
  rrnodeMirror: Mirror = (newTree as RRDocument).mirror ||
    (newTree.ownerDocument as RRDocument).mirror,
)

Source from the content-addressed store, hash-verified

102 * @param rrnodeMirror - The mirror of the new tree.
103 */
104export function diff(
105 oldTree: Node,
106 newTree: IRRNode,
107 replayer: ReplayerHandler,
108 rrnodeMirror: Mirror = (newTree as RRDocument).mirror ||
109 (newTree.ownerDocument as RRDocument).mirror,
110) {
111 oldTree = diffBeforeUpdatingChildren(
112 oldTree,
113 newTree,
114 replayer,
115 rrnodeMirror,
116 );
117
118 diffChildren(oldTree, newTree, replayer, rrnodeMirror);
119
120 diffAfterUpdatingChildren(oldTree, newTree, replayer);
121}
122
123/**
124 * Do some preparation work before updating the children of the old tree.

Callers 5

diff.test.tsFile · 0.90
dialog.test.tsFile · 0.90
constructorMethod · 0.90
diffChildrenFunction · 0.85

Calls 3

diffChildrenFunction · 0.85

Tested by

no test coverage detected