KonnorRogers / shadow-dom-testing-library

An extension of DOM-testing-library to provide hooks into the shadow dom
MIT License
98 stars 2 forks source link

`within` doesn't work for shadow root hosts #23

Closed CreativeTechGuy closed 2 years ago

CreativeTechGuy commented 2 years ago

If a shadow root host (eg: an element which has the .shadowRoot property non-null) is passed to within(), the queries don't work. I assume this is related to #20 since if I change within(elem) to within(elem.shadowRoot) it works.