rrweb
rrweb copied to clipboard
isBlocked factors in the selector
Support a list of blocked classes in a CSS selector (blockSelector) in addition to the blockClass. Also ensure only node types are passed into contains. Also support providing a list of CSS properties to ignore on set/remove stylesheet mutations
@Yuyz0112 Hey man, we've added a bunch of changes to Rrweb as we are using it on thousands of websites and noticed some flaws. Let us know if certain things are missing for this to get merged in.
Thanks for the PR @dbseel! When refactoring and speeding up isBlocked
for https://github.com/rrweb-io/rrweb/pull/903 I also noticed this was missing from rrweb. Happy you've created a PR for it.
Because https://github.com/rrweb-io/rrweb/pull/903 has changed the guts of isBlocked
drastically I expect it to create some merge issues for this branch once it gets merged in.
Hey @dbseel, any chance you could fix the merge conflicts?
@Juice10 Done. Can we get this merged in? It has been sitting here 3 months, don't want to have to rebase again.
Thanks for this @dbseel! Really appreciate your contribution. Apologies that it took so long for us to review it
No problem @Juice10! Are you able to merge? I don't have permissions.
I don't but I've messaged the other members of the core team, so it should get merged soon
Late to the party here!
@dbseel what are the use cases for ignoreCSSAttributes
? I see color
in the test case but curious as to the others. Is the motivation for this privacy, or performance (like slimDOM options).
Also wondering whether ignoreCSSProperties
would have been a better name?
@dbseel what are the use cases for
ignoreCSSAttributes
?
We have encountered some websites where certain attributes were constantly being added/removed/updated on the DOM, but they did not affect the replay. So there was a huge performance improvement by ignoring these attributes.
These are CSS rule attributes rather than DOM attributes though? I guess just thinking it must be very unusual that rules would be continually added/removed. Was it a standard part of some framework, or just some once off craziness on a particular website?
These are CSS rule attributes rather than DOM attributes though? I guess just thinking it must be very unusual that rules would be continually added/removed. Was it a standard part of some framework, or just some once off craziness on a particular website?
In our case a website was using quantum metrics. This plugin was adding/removing attributes thousands of times a second. Attributes like this: --quantum-metric-background-image
I've just come across this again today; I notice that ignoreCSSAttributes
doesn't omit them from capture from the initial snapshot. This wouldn't be significant for your usecase of mutations to --quantum-metric-background-image
, but for completeness does anyone think it needs to be added?