Skip to content

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

6 participants