From 306536b214e5febb432d782e3b30462a5a8fe298 Mon Sep 17 00:00:00 2001 From: Justin Halsall Date: Mon, 30 May 2022 15:45:27 +0200 Subject: [PATCH] Fix #904 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 90ca8f3765..d6247e44a1 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();