dperini / nwsapi

Fast CSS Selectors API Engine
MIT License
105 stars 36 forks source link

element selectors became case-sensitive in 2.2.1, in violation of spec #57

Closed bakkot closed 2 years ago

bakkot commented 2 years ago

A simple repro:

<!doctype html>
<body>
<p></p>
<script src="src/nwsapi.js"></script>
<script>
NW.Dom.install();
document.body.innerHTML += [document.body.querySelector('P') != null, document.body.querySelector('p') != null].join(', ');
</script>

With 2.2.1 this prints false, true, when it should be true, true.

Per spec, "All Selectors syntax is ASCII case-insensitive".

I suspect this is due to https://github.com/dperini/nwsapi/pull/37 or one of the followup commits, though I haven't investigated.

(Discovered because this broke jsdom, which broke ecmarkup, which broke one of the JavaScript specifications.)

dperini commented 2 years ago

@bakkot working on a quick fix, probably reverting #37

dperini commented 2 years ago

Should be fixed. Please check / test and let me know.

bakkot commented 2 years ago

@dperini Testing locally this does not appear to be fixed. My repro above has the same results as before.