LibWeb: Skip namespaced attributes in Element::attribute_changed()

Fixes the `dom/nodes/getElementsByClassName-11.xml` WPT test, which can
be imported but unfortunately not run since it's not an .html file.

Co-authored-by: YTBuzzles <bentory15@proton.me>
This commit is contained in:
Jelle Raaijmakers
2025-11-21 13:36:21 +01:00
committed by Jelle Raaijmakers
parent 999656a7d3
commit 405e270583
Notes: github-actions[bot] 2025-11-24 08:14:33 +00:00
3 changed files with 35 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<script src="include.js"></script>
<div id="tests">
<x class="a"></x>
<g:x class="a"></g:x>
<x t:class="a" h:class="a" g:class="a"></x>
<g:x t:class="a" h:class="a" g:class="a"></g:x>
<t:x class="a" t:class="a" h:class="a" g:class="a"></t:x>
</div>
<script>
test(() => {
const collection = document.getElementsByClassName("a");
println(`Matched elements: ${collection.length}`);
for (const match of collection) {
println(`Match: ${match.outerHTML}`);
}
})
</script>