mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
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:
committed by
Andreas Kling
parent
da88db04cf
commit
b7595013c1
Notes:
github-actions[bot]
2025-08-22 09:37:04 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/b7595013c13 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5944
11
Tests/LibWeb/Text/input/XML/attribute-order.html
Normal file
11
Tests/LibWeb/Text/input/XML/attribute-order.html
Normal 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>
|
||||
Reference in New Issue
Block a user