Skip to content

Commit

Permalink
The bare unattachedDoc that I previously naively created didn't have …
Browse files Browse the repository at this point in the history
…a doctype and wasn't a HTML document, so the child style element didn't have the `old.style` attribute available
  • Loading branch information
eoghanmurray committed Apr 12, 2023
1 parent d4f29f9 commit cc5e987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ export default class MutationBuffer {
if (isIgnored(m.target, this.mirror)) {
return;
}
const unattachedDoc = new Document(); // avoid upsetting original document from a Content Security point of view
const unattachedDoc = document.implementation.createHTMLDocument(); // avoid upsetting original document from a Content Security point of view
switch (m.type) {
case 'characterData': {
const value = m.target.textContent;
Expand Down

0 comments on commit cc5e987

Please sign in to comment.