ladybird/Tests/LibWeb/Text/input/XML/attribute-order.html
Andreas Kling b7595013c1 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.
2025-08-22 11:35:59 +02:00

11 lines
345 B
HTML

<!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>