We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.setAttribute('style')
1 parent 41cc822 commit 1c065e8Copy full SHA for 1c065e8
packages/rrweb/src/record/mutation.ts
@@ -462,6 +462,7 @@ export default class MutationBuffer {
462
if (isIgnored(m.target, this.mirror)) {
463
return;
464
}
465
+ const unattachedDoc = new Document(); // avoid upsetting original document from a Content Security point of view
466
switch (m.type) {
467
case 'characterData': {
468
const value = m.target.textContent;
@@ -543,7 +544,7 @@ export default class MutationBuffer {
543
544
545
546
if (attributeName === 'style') {
- const old = this.doc.createElement('span');
547
+ const old = unattachedDoc.createElement('span');
548
if (m.oldValue) {
549
old.setAttribute('style', m.oldValue);
550
0 commit comments