@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.
- package/dist/plugins/console-record.js +3 -3
- package/dist/plugins/console-record.min.js +3 -3
- package/dist/plugins/console-record.min.js.map +1 -1
- package/dist/plugins/console-replay.js +0 -0
- package/dist/plugins/console-replay.min.js +0 -0
- package/dist/plugins/console-replay.min.js.map +1 -1
- package/dist/plugins/sequential-id-record.js +0 -0
- package/dist/plugins/sequential-id-record.min.js +0 -0
- package/dist/plugins/sequential-id-record.min.js.map +0 -0
- package/dist/plugins/sequential-id-replay.js +0 -0
- package/dist/plugins/sequential-id-replay.min.js +0 -0
- package/dist/plugins/sequential-id-replay.min.js.map +0 -0
- package/dist/record/rrweb-record-pack.js +0 -0
- package/dist/record/rrweb-record-pack.min.js +0 -0
- package/dist/record/rrweb-record-pack.min.js.map +1 -1
- package/dist/record/rrweb-record.js +3 -3
- package/dist/record/rrweb-record.min.js +3 -3
- package/dist/record/rrweb-record.min.js.map +1 -1
- package/dist/replay/rrweb-replay-unpack.css +0 -0
- package/dist/replay/rrweb-replay-unpack.js +3 -3
- package/dist/replay/rrweb-replay-unpack.min.css +0 -0
- package/dist/replay/rrweb-replay-unpack.min.css.map +0 -0
- package/dist/replay/rrweb-replay-unpack.min.js +3 -3
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
- package/dist/replay/rrweb-replay.css +0 -0
- package/dist/replay/rrweb-replay.js +4 -4
- package/dist/replay/rrweb-replay.min.css +0 -0
- package/dist/replay/rrweb-replay.min.css.map +0 -0
- package/dist/replay/rrweb-replay.min.js +4 -4
- package/dist/replay/rrweb-replay.min.js.map +1 -1
- package/dist/rrweb-all.css +0 -0
- package/dist/rrweb-all.js +10 -10
- package/dist/rrweb-all.min.css +0 -0
- package/dist/rrweb-all.min.css.map +0 -0
- package/dist/rrweb-all.min.js +10 -10
- package/dist/rrweb-all.min.js.map +1 -1
- package/dist/rrweb.css +0 -0
- package/dist/rrweb.js +5 -5
- package/dist/rrweb.min.css +0 -0
- package/dist/rrweb.min.css.map +0 -0
- package/dist/rrweb.min.js +5 -5
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +0 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +0 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +0 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +0 -0
- package/es/rrweb/_virtual/image-bitmap-data-url-worker.js +0 -0
- package/es/rrweb/all.css +0 -0
- package/es/rrweb/ext/@xstate/fsm/es/index.js +0 -0
- package/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js +0 -0
- package/es/rrweb/ext/fflate/esm/browser.js +0 -0
- package/es/rrweb/ext/mitt/dist/mitt.mjs.js +0 -0
- package/es/rrweb/ext/tslib/tslib.es6.js +0 -0
- package/es/rrweb/packages/rrdom/es/rrdom.js +0 -0
- package/es/rrweb/packages/rrweb/src/entries/all.js +0 -0
- package/es/rrweb/packages/rrweb/src/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/packer/base.js +0 -0
- package/es/rrweb/packages/rrweb/src/packer/pack.js +0 -0
- package/es/rrweb/packages/rrweb/src/packer/unpack.js +0 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +0 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +0 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/mutation.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/observer.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +0 -0
- package/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/deserialize-args.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/index.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/machine.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +0 -0
- package/es/rrweb/packages/rrweb/src/replay/timer.js +0 -0
- package/es/rrweb/packages/rrweb/src/types.js +0 -0
- package/es/rrweb/packages/rrweb/src/utils.js +0 -0
- package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +12 -5
- package/lib/plugins/console-record.js +0 -0
- package/lib/plugins/console-replay.js +0 -0
- package/lib/plugins/sequential-id-record.js +0 -0
- package/lib/plugins/sequential-id-replay.js +0 -0
- package/lib/record/rrweb-record-pack.js +0 -0
- package/lib/record/rrweb-record.js +12 -5
- package/lib/replay/rrweb-replay-unpack.css +0 -0
- package/lib/replay/rrweb-replay-unpack.js +0 -0
- package/lib/replay/rrweb-replay.css +0 -0
- package/lib/replay/rrweb-replay.js +0 -0
- package/lib/rrweb-all.css +0 -0
- package/lib/rrweb-all.js +12 -5
- package/lib/rrweb.css +0 -0
- package/lib/rrweb.js +12 -5
- package/package.json +3 -3
- package/typings/entries/all.d.ts +0 -0
- package/typings/entries/record-pack.d.ts +0 -0
- package/typings/entries/replay-unpack.d.ts +0 -0
- package/typings/index.d.ts +0 -0
- package/typings/packer/base.d.ts +0 -0
- package/typings/packer/index.d.ts +0 -0
- package/typings/packer/pack.d.ts +0 -0
- package/typings/packer/unpack.d.ts +0 -0
- package/typings/plugins/console/record/error-stack-parser.d.ts +0 -0
- package/typings/plugins/console/record/index.d.ts +0 -0
- package/typings/plugins/console/record/stringify.d.ts +0 -0
- package/typings/plugins/console/replay/index.d.ts +0 -0
- package/typings/plugins/sequential-id/record/index.d.ts +0 -0
- package/typings/plugins/sequential-id/replay/index.d.ts +0 -0
- package/typings/record/iframe-manager.d.ts +0 -0
- package/typings/record/index.d.ts +0 -0
- package/typings/record/mutation.d.ts +0 -0
- package/typings/record/observer.d.ts +0 -0
- package/typings/record/observers/canvas/2d.d.ts +0 -0
- package/typings/record/observers/canvas/canvas-manager.d.ts +0 -0
- package/typings/record/observers/canvas/canvas.d.ts +0 -0
- package/typings/record/observers/canvas/serialize-args.d.ts +0 -0
- package/typings/record/observers/canvas/webgl.d.ts +0 -0
- package/typings/record/shadow-dom-manager.d.ts +0 -0
- package/typings/record/stylesheet-manager.d.ts +0 -0
- package/typings/record/workers/image-bitmap-data-url-worker.d.ts +0 -0
- package/typings/replay/canvas/2d.d.ts +0 -0
- package/typings/replay/canvas/deserialize-args.d.ts +0 -0
- package/typings/replay/canvas/index.d.ts +0 -0
- package/typings/replay/canvas/webgl.d.ts +0 -0
- package/typings/replay/index.d.ts +0 -0
- package/typings/replay/machine.d.ts +0 -0
- package/typings/replay/smoothscroll.d.ts +0 -0
- package/typings/replay/styles/inject-style.d.ts +0 -0
- package/typings/replay/timer.d.ts +0 -0
- package/typings/rrdom/index.d.ts +0 -0
- package/typings/rrdom/tree-node.d.ts +0 -0
- package/typings/types.d.ts +0 -0
- package/typings/utils.d.ts +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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.
|
|
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.
|
|
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": "
|
|
86
|
+
"gitHead": "5dc82d5d41dfdeb937efd030deaf377b3301b97d"
|
|
87
87
|
}
|
package/typings/entries/all.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/typings/index.d.ts
CHANGED
|
File without changes
|
package/typings/packer/base.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/typings/packer/pack.d.ts
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
|
|
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
|
package/typings/rrdom/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/typings/types.d.ts
CHANGED
|
File without changes
|
package/typings/utils.d.ts
CHANGED
|
File without changes
|