Closed odanado closed 5 months ago
Thank you for reporting @odanado! :slightly_smiling_face:
I believe that the current behavior is correct, which is to always return null for the query selector ':host' as it is pseudo element selector, which is not possible to use together with querySelector()
.
When I run the example code in Chrome, I get the same result.
I'm closing this now. Please re-open if your problem hasn't been solved based on the answer.
Thank you for a comment. I also checked the behavior in Chrome.
I use host property instead of :host
.
Describe the bug I found that when I create a custom element and run
querySelector(":host")
againstshadowRoot
, the return value is different depending on the version ofhappy-dom
.To Reproduce Steps to reproduce the behavior:
npm i
node src/index.js
Expected behavior Expect non-null values to be returned for both happy-dom@13.8.4 and happy-dom@13.8.5.
Device: