implemented the play any offset feature

This commit is contained in:
Yanzhen Yu
2018-10-18 16:24:01 +08:00
parent 8186f05e1c
commit 6c8cf5c379
4 changed files with 68 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
import { idNodeMap, NodeType, serializeNodeWithId } from 'rrweb-snapshot';
import { idNodeMap, NodeType, serializeNodeWithId, resetId } from 'rrweb-snapshot';
import {
Mirror,
throttleOptions,
@@ -32,6 +32,7 @@ export const mirror: Mirror = {
// TODO: transform this into the snapshot repo
export function getIdNodeMap(doc: Document) {
resetId();
const map: idNodeMap = {};
function walk(n: Node) {