Re: [WICG/webcomponents] There is no way to navigate to a fragment inside a shadow tree (#924)

> That's is what I'm trying to say which means there is a bug because that piece is missing.
If you search for the documentation on the CSS pseudo-class, there is nothing that says "It doesn't work in Web Components by the way"

I don't think this is a bug per se. It's more of a missing feature. This is very much the intended behavior. In general, id references work within each [tree](https://dom.spec.whatwg.org/#concept-tree), not across shadow boundaries. For example, `document.getElementsById(id)` will only find elements with the specified id in the [document tree](https://dom.spec.whatwg.org/#concept-document-tree), not any of the [shadow trees](https://dom.spec.whatwg.org/#concept-shadow-tree) connected to it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/924#issuecomment-837515081

Received on Monday, 10 May 2021 23:53:44 UTC