Merged
Conversation
60fe27a to
fdea178
Compare
eoghanmurray
added a commit
to statcounter/rrweb
that referenced
this pull request
Sep 29, 2021
eoghanmurray
added a commit
to statcounter/rrweb
that referenced
this pull request
Sep 29, 2021
Yuyz0112
pushed a commit
that referenced
this pull request
Oct 1, 2021
* `setTimeout` and `clearTimeout` are global functions. Think the window versions of them were for the following reason: https://stackoverflow.com/questions/60245787/ * Comments and extra test here helped me understand which inserts were expected and which are to be ignored * Add a test for the style setProperty/removeProperty added in #671 * Add a test to ensure that listeners get added correctly in nested iframes - particularly important for those which rely on prototype monkeypatching * Pass in the window object from the current iframe so that monkeypatching applies to all windows * Satisfy typings * No need to insert an iframe as there's one already set up for us * Enable the console logger to also intercept log messages within iframes * There's no tests for FontFace but presumably the monkeypatching here works similarly to the others
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CSS declaration observer
The Issue
There are browser APIs that can modify the value of CSS declaration by setting property and removing property. So we need to observe these changes and replay them.
The implementation
The CSS declaration observer was implemented in the general pattern and follow the latest design of @Juice10, e.g, using array index to handle nesting and store changes in virtual style when using a fragment.
Decisions
Two small designs do not fit well but can be improved in the following patches, without blocking this feature.
getNestedRulenot returnCSSGroupingRule, but in this scenario, it can returnCSSStyleRule.XXXRule, so it's a little confusing to naming an operation to CSS rule.