@highlight-run/rrweb 2.1.2 → 2.1.5

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 (143) 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 +10 -10
  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 +10 -10
  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 +12 -5
  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 +12 -5
  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 +12 -5
  102. package/lib/rrweb.css +0 -0
  103. package/lib/rrweb.js +12 -5
  104. package/package.json +3 -3
  105. package/typings/entries/all.d.ts +0 -0
  106. package/typings/entries/record-pack.d.ts +0 -0
  107. package/typings/entries/replay-unpack.d.ts +0 -0
  108. package/typings/index.d.ts +0 -0
  109. package/typings/packer/base.d.ts +0 -0
  110. package/typings/packer/index.d.ts +0 -0
  111. package/typings/packer/pack.d.ts +0 -0
  112. package/typings/packer/unpack.d.ts +0 -0
  113. package/typings/plugins/console/record/error-stack-parser.d.ts +0 -0
  114. package/typings/plugins/console/record/index.d.ts +0 -0
  115. package/typings/plugins/console/record/stringify.d.ts +0 -0
  116. package/typings/plugins/console/replay/index.d.ts +0 -0
  117. package/typings/plugins/sequential-id/record/index.d.ts +0 -0
  118. package/typings/plugins/sequential-id/replay/index.d.ts +0 -0
  119. package/typings/record/iframe-manager.d.ts +0 -0
  120. package/typings/record/index.d.ts +0 -0
  121. package/typings/record/mutation.d.ts +0 -0
  122. package/typings/record/observer.d.ts +0 -0
  123. package/typings/record/observers/canvas/2d.d.ts +0 -0
  124. package/typings/record/observers/canvas/canvas-manager.d.ts +0 -0
  125. package/typings/record/observers/canvas/canvas.d.ts +0 -0
  126. package/typings/record/observers/canvas/serialize-args.d.ts +0 -0
  127. package/typings/record/observers/canvas/webgl.d.ts +0 -0
  128. package/typings/record/shadow-dom-manager.d.ts +0 -0
  129. package/typings/record/stylesheet-manager.d.ts +0 -0
  130. package/typings/record/workers/image-bitmap-data-url-worker.d.ts +0 -0
  131. package/typings/replay/canvas/2d.d.ts +0 -0
  132. package/typings/replay/canvas/deserialize-args.d.ts +0 -0
  133. package/typings/replay/canvas/index.d.ts +0 -0
  134. package/typings/replay/canvas/webgl.d.ts +0 -0
  135. package/typings/replay/index.d.ts +0 -0
  136. package/typings/replay/machine.d.ts +0 -0
  137. package/typings/replay/smoothscroll.d.ts +0 -0
  138. package/typings/replay/styles/inject-style.d.ts +0 -0
  139. package/typings/replay/timer.d.ts +0 -0
  140. package/typings/rrdom/index.d.ts +0 -0
  141. package/typings/rrdom/tree-node.d.ts +0 -0
  142. package/typings/types.d.ts +0 -0
  143. package/typings/utils.d.ts +0 -0
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
@@ -471,6 +471,7 @@ function serializeNode(n, options) {
471
471
  inlineStylesheet: inlineStylesheet,
472
472
  maskInputOptions: maskInputOptions,
473
473
  maskInputFn: maskInputFn,
474
+ maskTextClass: maskTextClass,
474
475
  dataURLOptions: dataURLOptions,
475
476
  inlineImages: inlineImages,
476
477
  recordCanvas: recordCanvas,
@@ -569,8 +570,9 @@ function serializeTextNode(n, options) {
569
570
  };
570
571
  }
571
572
  function serializeElementNode(n, options) {
572
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _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;
573
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
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
576
  var tagName = getValidTagName(n);
575
577
  var attributes = {};
576
578
  var len = n.attributes.length;
@@ -644,7 +646,7 @@ function serializeElementNode(n, options) {
644
646
  }
645
647
  }
646
648
  }
647
- if (tagName === 'img' && inlineImages) {
649
+ if (tagName === 'img' && inlineImages && !needBlock) {
648
650
  if (!canvasService) {
649
651
  canvasService = doc.createElement('canvas');
650
652
  canvasCtx = canvasService.getContext('2d');
@@ -700,6 +702,9 @@ function serializeElementNode(n, options) {
700
702
  }
701
703
  delete attributes.src;
702
704
  }
705
+ if (needBlock && tagName === 'img') {
706
+ delete attributes.src;
707
+ }
703
708
  return {
704
709
  type: NodeType.Element,
705
710
  tagName: tagName,
@@ -837,9 +842,11 @@ function serializeNodeWithId(n, options) {
837
842
  onSerialize(n);
838
843
  }
839
844
  var recordChild = !skipChild;
845
+ var strictPrivacy = enableStrictPrivacy;
840
846
  if (serializedNode.type === NodeType.Element) {
841
847
  recordChild = recordChild && !serializedNode.needBlock;
842
- if (serializedNode.needBlock && serializedNode.tagName === 'img') {
848
+ strictPrivacy = !!serializedNode.needBlock;
849
+ if (strictPrivacy && serializedNode.tagName === 'img') {
843
850
  var clone = n.cloneNode();
844
851
  clone.src = '';
845
852
  mirror.add(clone, serializedNode);
@@ -880,7 +887,7 @@ function serializeNodeWithId(n, options) {
880
887
  onStylesheetLoad: onStylesheetLoad,
881
888
  stylesheetLoadTimeout: stylesheetLoadTimeout,
882
889
  keepIframeSrcFn: keepIframeSrcFn,
883
- enableStrictPrivacy: enableStrictPrivacy
890
+ enableStrictPrivacy: strictPrivacy
884
891
  };
885
892
  for (var _i = 0, _m = Array.from(n.childNodes); _i < _m.length; _i++) {
886
893
  var childN = _m[_i];
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -473,6 +473,7 @@ function serializeNode(n, options) {
473
473
  inlineStylesheet: inlineStylesheet,
474
474
  maskInputOptions: maskInputOptions,
475
475
  maskInputFn: maskInputFn,
476
+ maskTextClass: maskTextClass,
476
477
  dataURLOptions: dataURLOptions,
477
478
  inlineImages: inlineImages,
478
479
  recordCanvas: recordCanvas,
@@ -571,8 +572,9 @@ function serializeTextNode(n, options) {
571
572
  };
572
573
  }
573
574
  function serializeElementNode(n, options) {
574
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _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;
575
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
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
578
  var tagName = getValidTagName(n);
577
579
  var attributes = {};
578
580
  var len = n.attributes.length;
@@ -646,7 +648,7 @@ function serializeElementNode(n, options) {
646
648
  }
647
649
  }
648
650
  }
649
- if (tagName === 'img' && inlineImages) {
651
+ if (tagName === 'img' && inlineImages && !needBlock) {
650
652
  if (!canvasService) {
651
653
  canvasService = doc.createElement('canvas');
652
654
  canvasCtx = canvasService.getContext('2d');
@@ -702,6 +704,9 @@ function serializeElementNode(n, options) {
702
704
  }
703
705
  delete attributes.src;
704
706
  }
707
+ if (needBlock && tagName === 'img') {
708
+ delete attributes.src;
709
+ }
705
710
  return {
706
711
  type: NodeType.Element,
707
712
  tagName: tagName,
@@ -839,9 +844,11 @@ function serializeNodeWithId(n, options) {
839
844
  onSerialize(n);
840
845
  }
841
846
  var recordChild = !skipChild;
847
+ var strictPrivacy = enableStrictPrivacy;
842
848
  if (serializedNode.type === NodeType.Element) {
843
849
  recordChild = recordChild && !serializedNode.needBlock;
844
- if (serializedNode.needBlock && serializedNode.tagName === 'img') {
850
+ strictPrivacy = !!serializedNode.needBlock;
851
+ if (strictPrivacy && serializedNode.tagName === 'img') {
845
852
  var clone = n.cloneNode();
846
853
  clone.src = '';
847
854
  mirror.add(clone, serializedNode);
@@ -882,7 +889,7 @@ function serializeNodeWithId(n, options) {
882
889
  onStylesheetLoad: onStylesheetLoad,
883
890
  stylesheetLoadTimeout: stylesheetLoadTimeout,
884
891
  keepIframeSrcFn: keepIframeSrcFn,
885
- enableStrictPrivacy: enableStrictPrivacy
892
+ enableStrictPrivacy: strictPrivacy
886
893
  };
887
894
  for (var _i = 0, _m = Array.from(n.childNodes); _i < _m.length; _i++) {
888
895
  var childN = _m[_i];
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
@@ -475,6 +475,7 @@ function serializeNode(n, options) {
475
475
  inlineStylesheet: inlineStylesheet,
476
476
  maskInputOptions: maskInputOptions,
477
477
  maskInputFn: maskInputFn,
478
+ maskTextClass: maskTextClass,
478
479
  dataURLOptions: dataURLOptions,
479
480
  inlineImages: inlineImages,
480
481
  recordCanvas: recordCanvas,
@@ -573,8 +574,9 @@ function serializeTextNode(n, options) {
573
574
  };
574
575
  }
575
576
  function serializeElementNode(n, options) {
576
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _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;
577
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
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
580
  var tagName = getValidTagName$1(n);
579
581
  var attributes = {};
580
582
  var len = n.attributes.length;
@@ -648,7 +650,7 @@ function serializeElementNode(n, options) {
648
650
  }
649
651
  }
650
652
  }
651
- if (tagName === 'img' && inlineImages) {
653
+ if (tagName === 'img' && inlineImages && !needBlock) {
652
654
  if (!canvasService) {
653
655
  canvasService = doc.createElement('canvas');
654
656
  canvasCtx = canvasService.getContext('2d');
@@ -704,6 +706,9 @@ function serializeElementNode(n, options) {
704
706
  }
705
707
  delete attributes.src;
706
708
  }
709
+ if (needBlock && tagName === 'img') {
710
+ delete attributes.src;
711
+ }
707
712
  return {
708
713
  type: NodeType$2.Element,
709
714
  tagName: tagName,
@@ -841,9 +846,11 @@ function serializeNodeWithId(n, options) {
841
846
  onSerialize(n);
842
847
  }
843
848
  var recordChild = !skipChild;
849
+ var strictPrivacy = enableStrictPrivacy;
844
850
  if (serializedNode.type === NodeType$2.Element) {
845
851
  recordChild = recordChild && !serializedNode.needBlock;
846
- if (serializedNode.needBlock && serializedNode.tagName === 'img') {
852
+ strictPrivacy = !!serializedNode.needBlock;
853
+ if (strictPrivacy && serializedNode.tagName === 'img') {
847
854
  var clone = n.cloneNode();
848
855
  clone.src = '';
849
856
  mirror.add(clone, serializedNode);
@@ -884,7 +891,7 @@ function serializeNodeWithId(n, options) {
884
891
  onStylesheetLoad: onStylesheetLoad,
885
892
  stylesheetLoadTimeout: stylesheetLoadTimeout,
886
893
  keepIframeSrcFn: keepIframeSrcFn,
887
- enableStrictPrivacy: enableStrictPrivacy
894
+ enableStrictPrivacy: strictPrivacy
888
895
  };
889
896
  for (var _i = 0, _m = Array.from(n.childNodes); _i < _m.length; _i++) {
890
897
  var childN = _m[_i];
package/lib/rrweb.css CHANGED
File without changes
package/lib/rrweb.js CHANGED
@@ -475,6 +475,7 @@ function serializeNode(n, options) {
475
475
  inlineStylesheet: inlineStylesheet,
476
476
  maskInputOptions: maskInputOptions,
477
477
  maskInputFn: maskInputFn,
478
+ maskTextClass: maskTextClass,
478
479
  dataURLOptions: dataURLOptions,
479
480
  inlineImages: inlineImages,
480
481
  recordCanvas: recordCanvas,
@@ -573,8 +574,9 @@ function serializeTextNode(n, options) {
573
574
  };
574
575
  }
575
576
  function serializeElementNode(n, options) {
576
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _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;
577
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
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
580
  var tagName = getValidTagName$1(n);
579
581
  var attributes = {};
580
582
  var len = n.attributes.length;
@@ -648,7 +650,7 @@ function serializeElementNode(n, options) {
648
650
  }
649
651
  }
650
652
  }
651
- if (tagName === 'img' && inlineImages) {
653
+ if (tagName === 'img' && inlineImages && !needBlock) {
652
654
  if (!canvasService) {
653
655
  canvasService = doc.createElement('canvas');
654
656
  canvasCtx = canvasService.getContext('2d');
@@ -704,6 +706,9 @@ function serializeElementNode(n, options) {
704
706
  }
705
707
  delete attributes.src;
706
708
  }
709
+ if (needBlock && tagName === 'img') {
710
+ delete attributes.src;
711
+ }
707
712
  return {
708
713
  type: NodeType$2.Element,
709
714
  tagName: tagName,
@@ -841,9 +846,11 @@ function serializeNodeWithId(n, options) {
841
846
  onSerialize(n);
842
847
  }
843
848
  var recordChild = !skipChild;
849
+ var strictPrivacy = enableStrictPrivacy;
844
850
  if (serializedNode.type === NodeType$2.Element) {
845
851
  recordChild = recordChild && !serializedNode.needBlock;
846
- if (serializedNode.needBlock && serializedNode.tagName === 'img') {
852
+ strictPrivacy = !!serializedNode.needBlock;
853
+ if (strictPrivacy && serializedNode.tagName === 'img') {
847
854
  var clone = n.cloneNode();
848
855
  clone.src = '';
849
856
  mirror.add(clone, serializedNode);
@@ -884,7 +891,7 @@ function serializeNodeWithId(n, options) {
884
891
  onStylesheetLoad: onStylesheetLoad,
885
892
  stylesheetLoadTimeout: stylesheetLoadTimeout,
886
893
  keepIframeSrcFn: keepIframeSrcFn,
887
- enableStrictPrivacy: enableStrictPrivacy
894
+ enableStrictPrivacy: strictPrivacy
888
895
  };
889
896
  for (var _i = 0, _m = Array.from(n.childNodes); _i < _m.length; _i++) {
890
897
  var childN = _m[_i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highlight-run/rrweb",
3
- "version": "2.1.2",
3
+ "version": "2.1.5",
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.25",
79
+ "@highlight-run/rrweb-snapshot": "1.1.28",
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": "8e06f47a84774ac76f3fac474abc62770cc1f46b"
86
+ "gitHead": "5dc82d5d41dfdeb937efd030deaf377b3301b97d"
87
87
  }
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
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