Files
serenity/Tests/LibWeb/Text/input/HTML/get-innerHTML-xml.html
Maciej 1e3bb7dbe1 LibWeb: Make innerHTML for XML nodes actually return inner HTML
The spec says to just call the XML serialization algorithm, but it
returns the "outer serialization", and we need the "inner" one. Let's
just concatenate serializations of children; then the result produced is
similar to one from Blink or Gecko.

(cherry picked from commit 9eb568eacbcb36e6c1ffd6e61ebf8242a4422119)
2024-11-08 21:51:25 -05:00

11 lines
357 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
// We need an actual XML document to test this.
const svgstr = `<svg xmlns="http://www.w3.org/2000/svg">PASS</svg>`;
const svg = new DOMParser().parseFromString(svgstr, "image/svg+xml").documentElement;
println(svg.innerHTML);
});
</script>