ladybird/Tests/LibWeb/Text/input/DOM/DOMParser-xmlns.html
Maciej cad3b085a8 LibXML: Set XMLNS namespace for xmlns attribute
This is what Blink and Gecko do, and is required for serialization
(innerHTML etc.) of XML elements to work.
2024-07-14 11:49:31 +02:00

11 lines
465 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const svgstr = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:test="foo"></svg>`;
const svg = new DOMParser().parseFromString(svgstr, "image/svg+xml").documentElement;
for (const attr of svg.attributes) {
println(`namespaceURI=${attr.namespaceURI} prefix=${attr.prefix} localName=${attr.localName} value=${attr.value}`);
}
});
</script>