-
Notifications
You must be signed in to change notification settings - Fork 32
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
@lwc/synthetic-shadow installed even when native Shadow DOM is available #93
Comments
Shadow DOM has been introduced in jsdom 2 years ago with the 12.2 release. JSDOM 16.0 adds support for custom elements. So far synthetic shadow was always enabled regardless if native shadow DOM was supported on not by jsdom. Based on this, I don't think the @aputinski Could you please share a minimal repro of your issue for us to investigate further? Note: As of jsdom 16, the DOM constructors and prototypes are recreated from scratch. This |
Here's the test case: |
I gave a look into this specific issue and I understand better the source of this issue. IMO, we should add a config flag to turn off synthetic shadow in the case where it is not needed. |
Looks like this check is returning
undefined
even when native Shadow DOM is available (JSDOM 16).https://github.com/salesforce/lwc-test/blob/master/packages/%40lwc/jest-preset/src/setup.js#L9
I'm guessing
$constructorCache$
was changed at some point in JSDOM.Our LWC components are used with native Shadow DOM, so we have a few tests that check things like
assignedNodes()
The text was updated successfully, but these errors were encountered: