How to use the rrweb-snapshot.serializeNodeWithId function in rrweb-snapshot

To help you get started, we’ve selected a few rrweb-snapshot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rrweb-io / rrweb / src / record / observer.ts View on Github external
const pushAdd = (n: Node) => {
      const parentId = mirror.getId((n.parentNode as Node) as INode);
      if (parentId === -1) {
        return addQueue.push(n);
      }
      adds.push({
        parentId,
        previousId: !n.previousSibling
          ? n.previousSibling
          : mirror.getId(n.previousSibling as INode),
        nextId: !n.nextSibling
          ? n.nextSibling
          : mirror.getId((n.nextSibling as unknown) as INode),
        node: serializeNodeWithId(
          n,
          document,
          mirror.map,
          blockClass,
          true,
          inlineStylesheet,
          maskAllInputs,
        )!,
      });
    };

rrweb-snapshot

rrweb's component to take a snapshot of DOM, aka DOM serializer

MIT
Latest version published 2 years ago

Package Health Score

82 / 100
Full package analysis