From 9da1e432cc68b05bd97547398628346faa912f45 Mon Sep 17 00:00:00 2001 From: Justin Halsall Date: Tue, 31 May 2022 10:15:48 +0200 Subject: [PATCH] Fix #904 (#906) Properly remove crossorigin attribute --- packages/rrweb-snapshot/src/snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rrweb-snapshot/src/snapshot.ts b/packages/rrweb-snapshot/src/snapshot.ts index 90ca8f37..d6247e44 100644 --- a/packages/rrweb-snapshot/src/snapshot.ts +++ b/packages/rrweb-snapshot/src/snapshot.ts @@ -582,7 +582,7 @@ function serializeNode( } oldValue ? (attributes.crossOrigin = oldValue) - : delete attributes.crossOrigin; + : image.removeAttribute('crossorigin'); }; // The image content may not have finished loading yet. if (image.complete && image.naturalWidth !== 0) recordInlineImage();