jsdom icon indicating copy to clipboard operation
jsdom copied to clipboard

Selecting HTML elements became case sensitive

Open ge-ku opened this issue 1 year ago • 1 comments

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.

ge-ku avatar Jul 23 '24 09:07 ge-ku

This happened previously, incidentally.

bakkot avatar Sep 29 '24 19:09 bakkot