clarity
clarity copied to clipboard
Clarity 0.7.43 breaks partytown integration
Describe the bug New mediaInsertRule (and mediaDeleteRule) breaks clarity deployment inside webworker. We are running clarity through partytown and CSSMediaRule is undefined there, accessing it results in error printed to console.
This is only present in version 0.7.43, where the rules first appear. Previously version 0.7.41 ran without any issues.
TypeError: CSSMediaRule is undefined
_a https://www.clarity.ms/s/0.7.43/clarity.js:4
start https://www.clarity.ms/s/0.7.43/clarity.js:4
pi https://www.clarity.ms/s/0.7.43/clarity.js:4
Ui https://www.clarity.ms/s/0.7.43/clarity.js:4
Ui https://www.clarity.ms/s/0.7.43/clarity.js:4
Ji https://www.clarity.ms/s/0.7.43/clarity.js:4
Gi https://www.clarity.ms/s/0.7.43/clarity.js:4
anonymous https://www.clarity.ms/s/0.7.43/clarity.js:4
anonymous https://www.clarity.ms/s/0.7.43/clarity.js:4
run http://localhost:5173/~partytown/debug/partytown-ww-sw.js?v=0.10.2:713
receiveMessageFromSandboxToWorker http://localhost:5173/~partytown/debug/partytown-ww-sw.js?v=0.10.2:1811
receiveMessageFromSandboxToWorker http://localhost:5173/~partytown/debug/partytown-ww-sw.js?v=0.10.2:1819
Repro Steps
- Setup project with partytown
- Add clarity snippet in script tag with
type="text/partytown"