-
Notifications
You must be signed in to change notification settings - Fork 38
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
shadow dom (open) support #217
Comments
I'm not sure but the open shadow dom should work well in the current polyfill. If it doesn't, the contribution for it would be definitely valuable for the polyfill. |
I don't think it can work because nowhere in the polyfill I find any reference that checks the shadow root on nodes (e.g. `Element.shadowRoot ). Below is a test that proves the current polyfill is not working.
|
You're definitely right. Sorry for confusing you. The polyfill hasn't supported the shadow dom. You could consider to implement the shadow dom support inside your application or directly to the polyfill with a pull request. If the embedded shadow dom is an external component not made by you, the latter approach would be the only way to support it. If you consider how to add the shadow dom support directly into the polyfill, you could refer to the appropriate methods as follows:
|
Thanks for guidance! I've tried to fix it in getSpatialNavigationCandidates and focusingController but unfortunately it seems to take a bit more effort so I can't promise a PR any time soon. There are a lot of places where .shadowRoot and .host needs to be handled. Shadow Dom has no 'style' property so a lot of methods require patches (e.g. isBeingRendered, isVisible etc). There are also references to parentElement but Shadow DOM has no parentElement (only .host) so that needs to be checked as well. |
Thanks for sharing the info. I agree that it seems to require a bit efforts for handling all the things. |
I've made it work with shadow dom in my app. It's required to replace several native calls(e.g.
|
Thank you for sharing the major codes. If someone proposes the functionality as a PR considering the existing polyfill structure, |
I'm currently trying to implement this method, via editing the polyfill itself. Do you happen to have an example, or is your other posted method the best route? |
I'm aware the polyfill is not working on closed shadow dom. Is this the case with
open
shadow dom as well?The text was updated successfully, but these errors were encountered: