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

Selecting HTML elements became case sensitive #3750

Open
ge-ku opened this issue Jul 23, 2024 · 1 comment
Open

Selecting HTML elements became case sensitive #3750

ge-ku opened this issue Jul 23, 2024 · 1 comment
Labels
selectors CSS Selectors support

Comments

@ge-ku
Copy link

ge-ku commented Jul 23, 2024

Basic info:

  • Node.js version: 20.13.1
  • jsdom version: 24.1.1

Minimal reproduction case

const jsdom = require("jsdom");
const { JSDOM } = jsdom;

const dom = new JSDOM(`<!DOCTYPE html><myElement>Hello world</myElement>`);
console.log(dom.window.document.querySelector("myelement").textContent); // works in 24.1.1, 23.2.0 and 23.1.0
console.log(dom.window.document.querySelector("myElement").textContent); // error in 24.1.1, works in 23.2.0 and 23.1.0

How does similar code behave in browsers?

In browser case doesn't matter, document.querySelector('div') or document.querySelector('dIV') leads to the same result.

@bakkot
Copy link
Contributor

bakkot commented Sep 29, 2024

This happened previously, incidentally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selectors CSS Selectors support
Projects
None yet
Development

No branches or pull requests

3 participants