mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-15 15:42:52 +00:00
This is what Blink and Gecko do, and is required for serialization (innerHTML etc.) of XML elements to work.
11 lines
465 B
HTML
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>
|