Skip to content
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 issue #933 #942

Merged
merged 4 commits into from
Jul 22, 2022
Merged

fix issue #933 #942

merged 4 commits into from
Jul 22, 2022

Conversation

YunFeng0817
Copy link
Member

@YunFeng0817 YunFeng0817 commented Jul 21, 2022

This PR is trying to fix shadow dom recording problems #933 caused by shadydom and @lwc/synthetic-shadow. These two packages are all shadow dom polyfills but don't act exactly like native shadow dom, e.g. they don't provide style isolation.
The main idea of this PR is that on the recording side, we record poly-filled shadow doms as if they are native shadow doms but on the replayer side, we rebuild them as normal elements. That is we don't add isShadowHost and isShadow properties to them in the recorded results.

@YunFeng0817 YunFeng0817 linked an issue Jul 21, 2022 that may be closed by this pull request
1 task
@YunFeng0817
Copy link
Member Author

@pavlogavryliuk @lele0108 need your reviews too

@lele0108
Copy link
Contributor

@Mark-Fenng Nice PR!

I have been testing on Youtube.com (uses shadyDOM force fill) and notice that this captures more of the page correctly but does not rebuild mutations correctly. I suspect it has to do with the fact that Youtube will patch childNodes getter on Node objects so both snapshot and MutationObserver serialization is being affected. Would have to investigate more to see understand why.

@pavlogavryliuk
Copy link

@Mark-Fenng i have been testing on google partner page, works fine. Thank you for your work. It's really cool. 💪🏼💪🏼💪🏼

image

@Yuyz0112
Copy link
Member

great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Custom HTML elements attach a Shadow DOM
5 participants