LibWeb+LibXML: Preserve element attribute order in XML documents

We now use OrderedHashMap instead of HashMap to ensure that attributes
on XML elements retain their original order.
This commit is contained in:
Andreas Kling
2025-08-21 12:11:41 +02:00
committed by Andreas Kling
parent da88db04cf
commit b7595013c1
Notes: github-actions[bot] 2025-08-22 09:37:04 +00:00
7 changed files with 22 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
<!doctype html>
<script src="../include.js"></script>
<script>
test(() => {
const doc = new DOMParser().parseFromString(`<xml><foo a='1' b='2' c='3' d='4' e='5'/></xml>`, "application/xml");
const e = doc.firstChild.firstChild;
for (const a of e.attributes) {
println(a.name);
}
});
</script>