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

7761: Fixed elementIsChildOf returning false for nested web components #7762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreyoganesyan
Copy link
Contributor

A fix for #7761.

I basically had to write my own implementation of the standard element.contains() method in elementIsChildOf function. This implementation takes into account shadow roots and slots, which are commonly used in web components. The standard implementation does not.

I tested the solution in my own project and it fixes the issue. I have also tested it in the provided demos, it didn't seem to break anything.

Also, I've noticed that .mjs files are not included into the prettier job, so I added them and re-ran it.

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

Successfully merging this pull request may close these issues.

1 participant