Skip to content
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

fix(runtime): mock querySelectorAll #6175

Merged
merged 6 commits into from
Feb 25, 2025
Merged

fix(runtime): mock querySelectorAll #6175

merged 6 commits into from
Feb 25, 2025

Conversation

christian-bromann
Copy link
Member

What is the current behavior?

Importing the dist-custom-elements components in Node.js is failing due to the doc.querySelectorAll in hydrateScopedToShadow. This can cause issues when SSR components in Next.js.

What is the new behavior?

Enhance the document mock with an additional method to make the function a noop and fix the failure.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Added an e2e test for this.

Other information

cc @johnjenkins

Copy link
Contributor

@danielleroux danielleroux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christian-bromann Totally fine to close my PR 👍

@christian-bromann christian-bromann merged commit 7a3e150 into main Feb 25, 2025
70 of 71 checks passed
@christian-bromann christian-bromann deleted the cb/doc-mock branch February 25, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants