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 bd144be commit 92febdaCopy full SHA for 92febda
packages/rrweb/src/record/mutation.ts
@@ -426,6 +426,7 @@ export default class MutationBuffer {
426
if (isIgnored(m.target)) {
427
return;
428
}
429
+ const unattachedDoc = new Document(); // avoid upsetting original document from a Content Security point of view
430
switch (m.type) {
431
case 'characterData': {
432
const value = m.target.textContent;
@@ -472,7 +473,7 @@ export default class MutationBuffer {
472
473
this.attributes.push(item);
474
475
if (m.attributeName === 'style') {
- const old = this.doc.createElement('span');
476
+ const old = unattachedDoc.createElement('span');
477
if (m.oldValue) {
478
old.setAttribute('style', m.oldValue);
479
0 commit comments