As far as I'm aware, this happens to all versions.
Any hooks added to insertRule are dropped once rrweb stops recording.
Start capturing
Add a hook to CSSStyleSheet.prototype.insertRule
Stop capturing
Observe that hook added by step 2 is no longer in place
Expected/actual behaviors are two videos of a demo page (source: https://jsfiddle.net/pmd5L8v7/). Once hooked, adding a rule to change the color of the text snippet at the top should result in an output line, indicating that the hook worked. But in the result with rrweb, this behavior is absent, indicating that the hook was dropped.
Preflight Checklist
What package is this bug report for?
rrweb
Version
v1.1.3
Expected Behavior
Sentry/rrweb should not drop hooks on the prototypical chain (shown in demo under output).
See result without rrweb: https://imgur.com/C0veqB0
Actual Behavior
Sentry/rrweb does drop hooks installed.
See result with rrweb extension: https://imgur.com/a/DGIoUSv
Steps to Reproduce
As far as I'm aware, this happens to all versions.
Any hooks added to insertRule are dropped once rrweb stops recording.
Expected/actual behaviors are two videos of a demo page (source: https://jsfiddle.net/pmd5L8v7/). Once hooked, adding a rule to change the color of the text snippet at the top should result in an output line, indicating that the hook worked. But in the result with rrweb, this behavior is absent, indicating that the hook was dropped.
Testcase Gist URL
No response
Additional Information
This was originally filed with sentry @ https://github.com/getsentry/sentry-javascript/issues/11837 but was suggested to post the issue here.