-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Ensure CSS support is checked more robustly #1106
fix: Ensure CSS support is checked more robustly #1106
Conversation
@mydea Thanks for submitting this PR, I had no idea rrweb was being used to record virtual pages with JSDOM, very interesting use case! |
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Yeah, I only really found it due to tests using jsdom. But it showed that apparently some older CSS spec had this different, which may also happen in other browsers I guess - see: NV/CSSOM#105 I commited your suggestion 👍 thanks! |
Oops sorry accidentally deleted this branch 😬 restored it and reopened the PR! |
@Juice10 Is it OK to merge this one? |
OK, actually we ran into a problem with this (see getsentry#47), so I updated this PR to ensure we do not access Now, this is only checked on-demand. I also split this into to methods, one to check when we only want to access this, and one when we want to monkey patch this. |
@mydea thanks for the refactor and the bugfix, I’ve merged the PR |
Noticed this while debugging tests in sentry-javascript. it seems jsdom has a weird support for
CSSMediaRule
, where it is defined but if you look atCSSMediaRule.prototype
it is:I guess this could also be the case for other "weird" browsers or engines. I think it's safer to make sure everything we need is actually there at this point.
ref getsentry#42