pass mask input option to snapshot
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/smoothscroll-polyfill": "^0.3.0",
|
"@types/smoothscroll-polyfill": "^0.3.0",
|
||||||
"mitt": "^1.1.3",
|
"mitt": "^1.1.3",
|
||||||
"rrweb-snapshot": "^0.7.11",
|
"rrweb-snapshot": "^0.7.12",
|
||||||
"smoothscroll-polyfill": "^0.4.3"
|
"smoothscroll-polyfill": "^0.4.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,12 @@ function record(options: recordOptions = {}): listenerHandler | undefined {
|
|||||||
}),
|
}),
|
||||||
isCheckout,
|
isCheckout,
|
||||||
);
|
);
|
||||||
const [node, idNodeMap] = snapshot(document, blockClass, inlineStylesheet);
|
const [node, idNodeMap] = snapshot(
|
||||||
|
document,
|
||||||
|
blockClass,
|
||||||
|
inlineStylesheet,
|
||||||
|
maskAllInputs,
|
||||||
|
);
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return console.warn('Failed to snapshot the document');
|
return console.warn('Failed to snapshot the document');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ function initMutationObserver(
|
|||||||
cb: mutationCallBack,
|
cb: mutationCallBack,
|
||||||
blockClass: blockClass,
|
blockClass: blockClass,
|
||||||
inlineStylesheet: boolean,
|
inlineStylesheet: boolean,
|
||||||
|
maskAllInputs: boolean,
|
||||||
): MutationObserver {
|
): MutationObserver {
|
||||||
const observer = new MutationObserver(mutations => {
|
const observer = new MutationObserver(mutations => {
|
||||||
const texts: textCursor[] = [];
|
const texts: textCursor[] = [];
|
||||||
@@ -197,6 +198,7 @@ function initMutationObserver(
|
|||||||
blockClass,
|
blockClass,
|
||||||
true,
|
true,
|
||||||
inlineStylesheet,
|
inlineStylesheet,
|
||||||
|
maskAllInputs,
|
||||||
)!,
|
)!,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -495,6 +497,7 @@ export default function initObservers(o: observerParam): listenerHandler {
|
|||||||
o.mutationCb,
|
o.mutationCb,
|
||||||
o.blockClass,
|
o.blockClass,
|
||||||
o.inlineStylesheet,
|
o.inlineStylesheet,
|
||||||
|
o.maskAllInputs,
|
||||||
);
|
);
|
||||||
const mousemoveHandler = initMousemoveObserver(o.mousemoveCb);
|
const mousemoveHandler = initMousemoveObserver(o.mousemoveCb);
|
||||||
const mouseInteractionHandler = initMouseInteractionObserver(
|
const mouseInteractionHandler = initMouseInteractionObserver(
|
||||||
|
|||||||
Reference in New Issue
Block a user