(
oldTree: Node,
newTree: IRRNode,
replayer: ReplayerHandler,
rrnodeMirror: Mirror = (newTree as RRDocument).mirror ||
(newTree.ownerDocument as RRDocument).mirror,
)
| 102 | * @param rrnodeMirror - The mirror of the new tree. |
| 103 | */ |
| 104 | export 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. |
no test coverage detected