mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 00:08:55 +00:00
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.
This commit is contained in:
parent
cad3b085a8
commit
9eb568eacb
Notes:
sideshowbarker
2024-07-17 00:23:42 +09:00
Author: https://github.com/sppmacd
Commit: 9eb568eacb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/616
Issue: https://github.com/LadybirdBrowser/ladybird/issues/612
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/sideshowbarker
3 changed files with 22 additions and 0 deletions
10
Tests/LibWeb/Text/input/HTML/get-innerHTML-xml.html
Normal file
10
Tests/LibWeb/Text/input/HTML/get-innerHTML-xml.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue