@highlight-run/rrweb 2.1.4 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/plugins/console-record.js +3 -3
  2. package/dist/plugins/console-record.min.js +3 -3
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.js +0 -0
  5. package/dist/plugins/console-replay.min.js +0 -0
  6. package/dist/plugins/console-replay.min.js.map +1 -1
  7. package/dist/plugins/sequential-id-record.js +0 -0
  8. package/dist/plugins/sequential-id-record.min.js +0 -0
  9. package/dist/plugins/sequential-id-record.min.js.map +0 -0
  10. package/dist/plugins/sequential-id-replay.js +0 -0
  11. package/dist/plugins/sequential-id-replay.min.js +0 -0
  12. package/dist/plugins/sequential-id-replay.min.js.map +0 -0
  13. package/dist/record/rrweb-record-pack.js +0 -0
  14. package/dist/record/rrweb-record-pack.min.js +0 -0
  15. package/dist/record/rrweb-record-pack.min.js.map +1 -1
  16. package/dist/record/rrweb-record.js +3 -3
  17. package/dist/record/rrweb-record.min.js +3 -3
  18. package/dist/record/rrweb-record.min.js.map +1 -1
  19. package/dist/replay/rrweb-replay-unpack.css +0 -0
  20. package/dist/replay/rrweb-replay-unpack.js +3 -3
  21. package/dist/replay/rrweb-replay-unpack.min.css +0 -0
  22. package/dist/replay/rrweb-replay-unpack.min.css.map +0 -0
  23. package/dist/replay/rrweb-replay-unpack.min.js +3 -3
  24. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  25. package/dist/replay/rrweb-replay.css +0 -0
  26. package/dist/replay/rrweb-replay.js +4 -4
  27. package/dist/replay/rrweb-replay.min.css +0 -0
  28. package/dist/replay/rrweb-replay.min.css.map +0 -0
  29. package/dist/replay/rrweb-replay.min.js +4 -4
  30. package/dist/replay/rrweb-replay.min.js.map +1 -1
  31. package/dist/rrweb-all.css +0 -0
  32. package/dist/rrweb-all.js +6 -6
  33. package/dist/rrweb-all.min.css +0 -0
  34. package/dist/rrweb-all.min.css.map +0 -0
  35. package/dist/rrweb-all.min.js +6 -6
  36. package/dist/rrweb-all.min.js.map +1 -1
  37. package/dist/rrweb.css +0 -0
  38. package/dist/rrweb.js +5 -5
  39. package/dist/rrweb.min.css +0 -0
  40. package/dist/rrweb.min.css.map +0 -0
  41. package/dist/rrweb.min.js +5 -5
  42. package/dist/rrweb.min.js.map +1 -1
  43. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +0 -0
  44. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +0 -0
  45. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -0
  46. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +0 -0
  47. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +0 -0
  48. package/es/rrweb/_virtual/image-bitmap-data-url-worker.js +0 -0
  49. package/es/rrweb/all.css +0 -0
  50. package/es/rrweb/ext/@xstate/fsm/es/index.js +0 -0
  51. package/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js +0 -0
  52. package/es/rrweb/ext/fflate/esm/browser.js +0 -0
  53. package/es/rrweb/ext/mitt/dist/mitt.mjs.js +0 -0
  54. package/es/rrweb/ext/tslib/tslib.es6.js +0 -0
  55. package/es/rrweb/packages/rrdom/es/rrdom.js +0 -0
  56. package/es/rrweb/packages/rrweb/src/entries/all.js +0 -0
  57. package/es/rrweb/packages/rrweb/src/index.js +0 -0
  58. package/es/rrweb/packages/rrweb/src/packer/base.js +0 -0
  59. package/es/rrweb/packages/rrweb/src/packer/pack.js +0 -0
  60. package/es/rrweb/packages/rrweb/src/packer/unpack.js +0 -0
  61. package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +0 -0
  62. package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +0 -0
  63. package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +0 -0
  64. package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +0 -0
  65. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +0 -0
  66. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +0 -0
  67. package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +0 -0
  68. package/es/rrweb/packages/rrweb/src/record/index.js +0 -0
  69. package/es/rrweb/packages/rrweb/src/record/mutation.js +0 -0
  70. package/es/rrweb/packages/rrweb/src/record/observer.js +0 -0
  71. package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +0 -0
  72. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +0 -0
  73. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +0 -0
  74. package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +0 -0
  75. package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +0 -0
  76. package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +0 -0
  77. package/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js +0 -0
  78. package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +0 -0
  79. package/es/rrweb/packages/rrweb/src/replay/canvas/deserialize-args.js +0 -0
  80. package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +0 -0
  81. package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +0 -0
  82. package/es/rrweb/packages/rrweb/src/replay/index.js +0 -0
  83. package/es/rrweb/packages/rrweb/src/replay/machine.js +0 -0
  84. package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +0 -0
  85. package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +0 -0
  86. package/es/rrweb/packages/rrweb/src/replay/timer.js +0 -0
  87. package/es/rrweb/packages/rrweb/src/types.js +0 -0
  88. package/es/rrweb/packages/rrweb/src/utils.js +0 -0
  89. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +17 -10
  90. package/lib/plugins/console-record.js +0 -0
  91. package/lib/plugins/console-replay.js +0 -0
  92. package/lib/plugins/sequential-id-record.js +0 -0
  93. package/lib/plugins/sequential-id-replay.js +0 -0
  94. package/lib/record/rrweb-record-pack.js +0 -0
  95. package/lib/record/rrweb-record.js +17 -10
  96. package/lib/replay/rrweb-replay-unpack.css +0 -0
  97. package/lib/replay/rrweb-replay-unpack.js +0 -0
  98. package/lib/replay/rrweb-replay.css +0 -0
  99. package/lib/replay/rrweb-replay.js +0 -0
  100. package/lib/rrweb-all.css +0 -0
  101. package/lib/rrweb-all.js +17 -10
  102. package/lib/rrweb.css +0 -0
  103. package/lib/rrweb.js +17 -10
  104. package/package.json +3 -3
File without changes
package/es/rrweb/all.css CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -571,8 +571,8 @@ function serializeTextNode(n, options) {
571
571
  }
572
572
  function serializeElementNode(n, options) {
573
573
  var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
574
- var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
575
- _isBlockedElement(n, maskTextClass, null);
574
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector);
575
+ var needMask = _isBlockedElement(n, maskTextClass, null);
576
576
  var tagName = getValidTagName(n);
577
577
  var attributes = {};
578
578
  var len = n.attributes.length;
@@ -646,7 +646,11 @@ function serializeElementNode(n, options) {
646
646
  }
647
647
  }
648
648
  }
649
- if (tagName === 'img' && inlineImages && !needBlock) {
649
+ if (tagName === 'img' &&
650
+ inlineImages &&
651
+ !needBlock &&
652
+ !needMask &&
653
+ !enableStrictPrivacy) {
650
654
  if (!canvasService) {
651
655
  canvasService = doc.createElement('canvas');
652
656
  canvasCtx = canvasService.getContext('2d');
@@ -687,14 +691,16 @@ function serializeElementNode(n, options) {
687
691
  attributes.rr_scrollTop = n.scrollTop;
688
692
  }
689
693
  }
690
- if (needBlock || (tagName === 'img' && enableStrictPrivacy)) {
694
+ if (needBlock || needMask || (tagName === 'img' && enableStrictPrivacy)) {
691
695
  var _d = n.getBoundingClientRect(), width = _d.width, height = _d.height;
692
696
  attributes = {
693
697
  "class": attributes["class"],
694
698
  rr_width: "".concat(width, "px"),
695
699
  rr_height: "".concat(height, "px")
696
700
  };
697
- needBlock = true;
701
+ if (enableStrictPrivacy) {
702
+ needBlock = true;
703
+ }
698
704
  }
699
705
  if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {
700
706
  if (!n.contentDocument) {
@@ -702,9 +708,6 @@ function serializeElementNode(n, options) {
702
708
  }
703
709
  delete attributes.src;
704
710
  }
705
- if (needBlock && tagName === 'img') {
706
- delete attributes.src;
707
- }
708
711
  return {
709
712
  type: NodeType.Element,
710
713
  tagName: tagName,
@@ -712,6 +715,7 @@ function serializeElementNode(n, options) {
712
715
  childNodes: [],
713
716
  isSVG: isSVGElement(n) || undefined,
714
717
  needBlock: needBlock,
718
+ needMask: needMask,
715
719
  rootId: rootId
716
720
  };
717
721
  }
@@ -845,14 +849,17 @@ function serializeNodeWithId(n, options) {
845
849
  var strictPrivacy = enableStrictPrivacy;
846
850
  if (serializedNode.type === NodeType.Element) {
847
851
  recordChild = recordChild && !serializedNode.needBlock;
848
- strictPrivacy = !!serializedNode.needBlock;
849
- console.log('vadim strictPrivacy', { strictPrivacy: strictPrivacy, enableStrictPrivacy: enableStrictPrivacy });
852
+ strictPrivacy =
853
+ enableStrictPrivacy ||
854
+ !!serializedNode.needBlock ||
855
+ !!serializedNode.needMask;
850
856
  if (strictPrivacy && serializedNode.tagName === 'img') {
851
857
  var clone = n.cloneNode();
852
858
  clone.src = '';
853
859
  mirror.add(clone, serializedNode);
854
860
  }
855
861
  delete serializedNode.needBlock;
862
+ delete serializedNode.needMask;
856
863
  var shadowRoot = n.shadowRoot;
857
864
  if (shadowRoot && isNativeShadowDom(shadowRoot))
858
865
  serializedNode.isShadowHost = true;
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -573,8 +573,8 @@ function serializeTextNode(n, options) {
573
573
  }
574
574
  function serializeElementNode(n, options) {
575
575
  var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
576
- var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
577
- _isBlockedElement(n, maskTextClass, null);
576
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector);
577
+ var needMask = _isBlockedElement(n, maskTextClass, null);
578
578
  var tagName = getValidTagName(n);
579
579
  var attributes = {};
580
580
  var len = n.attributes.length;
@@ -648,7 +648,11 @@ function serializeElementNode(n, options) {
648
648
  }
649
649
  }
650
650
  }
651
- if (tagName === 'img' && inlineImages && !needBlock) {
651
+ if (tagName === 'img' &&
652
+ inlineImages &&
653
+ !needBlock &&
654
+ !needMask &&
655
+ !enableStrictPrivacy) {
652
656
  if (!canvasService) {
653
657
  canvasService = doc.createElement('canvas');
654
658
  canvasCtx = canvasService.getContext('2d');
@@ -689,14 +693,16 @@ function serializeElementNode(n, options) {
689
693
  attributes.rr_scrollTop = n.scrollTop;
690
694
  }
691
695
  }
692
- if (needBlock || (tagName === 'img' && enableStrictPrivacy)) {
696
+ if (needBlock || needMask || (tagName === 'img' && enableStrictPrivacy)) {
693
697
  var _d = n.getBoundingClientRect(), width = _d.width, height = _d.height;
694
698
  attributes = {
695
699
  "class": attributes["class"],
696
700
  rr_width: "".concat(width, "px"),
697
701
  rr_height: "".concat(height, "px")
698
702
  };
699
- needBlock = true;
703
+ if (enableStrictPrivacy) {
704
+ needBlock = true;
705
+ }
700
706
  }
701
707
  if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {
702
708
  if (!n.contentDocument) {
@@ -704,9 +710,6 @@ function serializeElementNode(n, options) {
704
710
  }
705
711
  delete attributes.src;
706
712
  }
707
- if (needBlock && tagName === 'img') {
708
- delete attributes.src;
709
- }
710
713
  return {
711
714
  type: NodeType.Element,
712
715
  tagName: tagName,
@@ -714,6 +717,7 @@ function serializeElementNode(n, options) {
714
717
  childNodes: [],
715
718
  isSVG: isSVGElement(n) || undefined,
716
719
  needBlock: needBlock,
720
+ needMask: needMask,
717
721
  rootId: rootId
718
722
  };
719
723
  }
@@ -847,14 +851,17 @@ function serializeNodeWithId(n, options) {
847
851
  var strictPrivacy = enableStrictPrivacy;
848
852
  if (serializedNode.type === NodeType.Element) {
849
853
  recordChild = recordChild && !serializedNode.needBlock;
850
- strictPrivacy = !!serializedNode.needBlock;
851
- console.log('vadim strictPrivacy', { strictPrivacy: strictPrivacy, enableStrictPrivacy: enableStrictPrivacy });
854
+ strictPrivacy =
855
+ enableStrictPrivacy ||
856
+ !!serializedNode.needBlock ||
857
+ !!serializedNode.needMask;
852
858
  if (strictPrivacy && serializedNode.tagName === 'img') {
853
859
  var clone = n.cloneNode();
854
860
  clone.src = '';
855
861
  mirror.add(clone, serializedNode);
856
862
  }
857
863
  delete serializedNode.needBlock;
864
+ delete serializedNode.needMask;
858
865
  var shadowRoot = n.shadowRoot;
859
866
  if (shadowRoot && isNativeShadowDom(shadowRoot))
860
867
  serializedNode.isShadowHost = true;
File without changes
File without changes
File without changes
File without changes
package/lib/rrweb-all.css CHANGED
File without changes
package/lib/rrweb-all.js CHANGED
@@ -575,8 +575,8 @@ function serializeTextNode(n, options) {
575
575
  }
576
576
  function serializeElementNode(n, options) {
577
577
  var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
578
- var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
579
- _isBlockedElement(n, maskTextClass, null);
578
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector);
579
+ var needMask = _isBlockedElement(n, maskTextClass, null);
580
580
  var tagName = getValidTagName$1(n);
581
581
  var attributes = {};
582
582
  var len = n.attributes.length;
@@ -650,7 +650,11 @@ function serializeElementNode(n, options) {
650
650
  }
651
651
  }
652
652
  }
653
- if (tagName === 'img' && inlineImages && !needBlock) {
653
+ if (tagName === 'img' &&
654
+ inlineImages &&
655
+ !needBlock &&
656
+ !needMask &&
657
+ !enableStrictPrivacy) {
654
658
  if (!canvasService) {
655
659
  canvasService = doc.createElement('canvas');
656
660
  canvasCtx = canvasService.getContext('2d');
@@ -691,14 +695,16 @@ function serializeElementNode(n, options) {
691
695
  attributes.rr_scrollTop = n.scrollTop;
692
696
  }
693
697
  }
694
- if (needBlock || (tagName === 'img' && enableStrictPrivacy)) {
698
+ if (needBlock || needMask || (tagName === 'img' && enableStrictPrivacy)) {
695
699
  var _d = n.getBoundingClientRect(), width = _d.width, height = _d.height;
696
700
  attributes = {
697
701
  "class": attributes["class"],
698
702
  rr_width: "".concat(width, "px"),
699
703
  rr_height: "".concat(height, "px")
700
704
  };
701
- needBlock = true;
705
+ if (enableStrictPrivacy) {
706
+ needBlock = true;
707
+ }
702
708
  }
703
709
  if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {
704
710
  if (!n.contentDocument) {
@@ -706,9 +712,6 @@ function serializeElementNode(n, options) {
706
712
  }
707
713
  delete attributes.src;
708
714
  }
709
- if (needBlock && tagName === 'img') {
710
- delete attributes.src;
711
- }
712
715
  return {
713
716
  type: NodeType$2.Element,
714
717
  tagName: tagName,
@@ -716,6 +719,7 @@ function serializeElementNode(n, options) {
716
719
  childNodes: [],
717
720
  isSVG: isSVGElement(n) || undefined,
718
721
  needBlock: needBlock,
722
+ needMask: needMask,
719
723
  rootId: rootId
720
724
  };
721
725
  }
@@ -849,14 +853,17 @@ function serializeNodeWithId(n, options) {
849
853
  var strictPrivacy = enableStrictPrivacy;
850
854
  if (serializedNode.type === NodeType$2.Element) {
851
855
  recordChild = recordChild && !serializedNode.needBlock;
852
- strictPrivacy = !!serializedNode.needBlock;
853
- console.log('vadim strictPrivacy', { strictPrivacy: strictPrivacy, enableStrictPrivacy: enableStrictPrivacy });
856
+ strictPrivacy =
857
+ enableStrictPrivacy ||
858
+ !!serializedNode.needBlock ||
859
+ !!serializedNode.needMask;
854
860
  if (strictPrivacy && serializedNode.tagName === 'img') {
855
861
  var clone = n.cloneNode();
856
862
  clone.src = '';
857
863
  mirror.add(clone, serializedNode);
858
864
  }
859
865
  delete serializedNode.needBlock;
866
+ delete serializedNode.needMask;
860
867
  var shadowRoot = n.shadowRoot;
861
868
  if (shadowRoot && isNativeShadowDom(shadowRoot))
862
869
  serializedNode.isShadowHost = true;
package/lib/rrweb.css CHANGED
File without changes
package/lib/rrweb.js CHANGED
@@ -575,8 +575,8 @@ function serializeTextNode(n, options) {
575
575
  }
576
576
  function serializeElementNode(n, options) {
577
577
  var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
578
- var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
579
- _isBlockedElement(n, maskTextClass, null);
578
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector);
579
+ var needMask = _isBlockedElement(n, maskTextClass, null);
580
580
  var tagName = getValidTagName$1(n);
581
581
  var attributes = {};
582
582
  var len = n.attributes.length;
@@ -650,7 +650,11 @@ function serializeElementNode(n, options) {
650
650
  }
651
651
  }
652
652
  }
653
- if (tagName === 'img' && inlineImages && !needBlock) {
653
+ if (tagName === 'img' &&
654
+ inlineImages &&
655
+ !needBlock &&
656
+ !needMask &&
657
+ !enableStrictPrivacy) {
654
658
  if (!canvasService) {
655
659
  canvasService = doc.createElement('canvas');
656
660
  canvasCtx = canvasService.getContext('2d');
@@ -691,14 +695,16 @@ function serializeElementNode(n, options) {
691
695
  attributes.rr_scrollTop = n.scrollTop;
692
696
  }
693
697
  }
694
- if (needBlock || (tagName === 'img' && enableStrictPrivacy)) {
698
+ if (needBlock || needMask || (tagName === 'img' && enableStrictPrivacy)) {
695
699
  var _d = n.getBoundingClientRect(), width = _d.width, height = _d.height;
696
700
  attributes = {
697
701
  "class": attributes["class"],
698
702
  rr_width: "".concat(width, "px"),
699
703
  rr_height: "".concat(height, "px")
700
704
  };
701
- needBlock = true;
705
+ if (enableStrictPrivacy) {
706
+ needBlock = true;
707
+ }
702
708
  }
703
709
  if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {
704
710
  if (!n.contentDocument) {
@@ -706,9 +712,6 @@ function serializeElementNode(n, options) {
706
712
  }
707
713
  delete attributes.src;
708
714
  }
709
- if (needBlock && tagName === 'img') {
710
- delete attributes.src;
711
- }
712
715
  return {
713
716
  type: NodeType$2.Element,
714
717
  tagName: tagName,
@@ -716,6 +719,7 @@ function serializeElementNode(n, options) {
716
719
  childNodes: [],
717
720
  isSVG: isSVGElement(n) || undefined,
718
721
  needBlock: needBlock,
722
+ needMask: needMask,
719
723
  rootId: rootId
720
724
  };
721
725
  }
@@ -849,14 +853,17 @@ function serializeNodeWithId(n, options) {
849
853
  var strictPrivacy = enableStrictPrivacy;
850
854
  if (serializedNode.type === NodeType$2.Element) {
851
855
  recordChild = recordChild && !serializedNode.needBlock;
852
- strictPrivacy = !!serializedNode.needBlock;
853
- console.log('vadim strictPrivacy', { strictPrivacy: strictPrivacy, enableStrictPrivacy: enableStrictPrivacy });
856
+ strictPrivacy =
857
+ enableStrictPrivacy ||
858
+ !!serializedNode.needBlock ||
859
+ !!serializedNode.needMask;
854
860
  if (strictPrivacy && serializedNode.tagName === 'img') {
855
861
  var clone = n.cloneNode();
856
862
  clone.src = '';
857
863
  mirror.add(clone, serializedNode);
858
864
  }
859
865
  delete serializedNode.needBlock;
866
+ delete serializedNode.needMask;
860
867
  var shadowRoot = n.shadowRoot;
861
868
  if (shadowRoot && isNativeShadowDom(shadowRoot))
862
869
  serializedNode.isShadowHost = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highlight-run/rrweb",
3
- "version": "2.1.4",
3
+ "version": "2.1.7",
4
4
  "description": "record and replay the web",
5
5
  "scripts": {
6
6
  "prepare": "npm run prepack",
@@ -76,12 +76,12 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@highlight-run/rrdom": "0.1.17",
79
- "@highlight-run/rrweb-snapshot": "1.1.27",
79
+ "@highlight-run/rrweb-snapshot": "1.1.30",
80
80
  "@types/css-font-loading-module": "0.0.7",
81
81
  "@xstate/fsm": "^1.4.0",
82
82
  "base64-arraybuffer": "^1.0.1",
83
83
  "fflate": "^0.4.4",
84
84
  "mitt": "^3.0.0"
85
85
  },
86
- "gitHead": "ee5ef112cb3c2d2bd70078d428985ba8507ec070"
86
+ "gitHead": "f9d87780814fe229ed2a91ade9aa0b328242dc1b"
87
87
  }