Skip to content

Commit aae3063

Browse files
authored
Merge pull request #40 from pendo-io/jg-fix-csp-error-on-mutation
Add fixes from record side branch in to pendo-main
2 parents 4e93670 + 9a34fef commit aae3063

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/rrweb-snapshot/src/snapshot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export function needMaskingText(
273273
let el: Element;
274274
if (isElement(node)) {
275275
el = node;
276+
if (maskTextSelector === '*') return true;
276277
if (!dom.childNodes(el).length) {
277278
// optimisation: we can avoid any of the below checks on leaf elements
278279
// as masking is applied to child text nodes only

packages/rrweb/src/record/mutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ export default class MutationBuffer {
693693
}
694694
const old = this.unattachedDoc.createElement('span');
695695
if (m.oldValue) {
696-
old.setAttribute('style', m.oldValue);
696+
old.style.cssText = m.oldValue;
697697
}
698698
for (const pname of Array.from(target.style)) {
699699
const newValue = target.style.getPropertyValue(pname);

0 commit comments

Comments
 (0)