Skip to content

Commit

Permalink
Remove disabled code
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewortwein committed Sep 24, 2024
1 parent b046610 commit 8aeb507
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
12 changes: 0 additions & 12 deletions packages/rrweb-snapshot/src/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,18 +450,6 @@ export function buildNodeWithSN(
if (!node) {
return null;
}
// // @ts-expect-error TODO
// if (n.chromaticAdoptedStylesheets) {
// // @ts-expect-error TODO
// // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
// n.chromaticAdoptedStylesheets.forEach((sheet) => {
// const styleSheet = new CSSStyleSheet();
// // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
// styleSheet.replaceSync(sheet);
// // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
// doc.adoptedStyleSheets.push(styleSheet);
// });
// }
// If the snapshot is created by checkout, the rootId doesn't change but the iframe's document can be changed automatically when a new iframe element is created.
if (n.rootId && (mirror.getNode(n.rootId) as Document) !== doc) {
mirror.replace(n.rootId, doc);
Expand Down
13 changes: 0 additions & 13 deletions packages/rrweb-snapshot/src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1023,19 +1023,6 @@ export function serializeNodeWithId(
onSerialize(n);
}
let recordChild = !skipChild;
// // @ts-expect-error TODO
// if (n.adoptedStyleSheets) {
// // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
// serializedNode.chromaticAdoptedStylesheets =
// // @ts-expect-error TODO
// // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
// n.adoptedStyleSheets.map(
// // @ts-expect-error TODO
// (stylesheet) =>
// // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
// stringifyStylesheet(stylesheet),
// );
// }
if (serializedNode.type === NodeType.Element) {
recordChild = recordChild && !serializedNode.needBlock;
// this property was not needed in replay side
Expand Down

0 comments on commit 8aeb507

Please sign in to comment.