LibWeb: Clone CDATASection nodes with the correct node type

We were cloning these as plain Text nodes, but the clone must also be a
CDATASection node.
This commit is contained in:
Timothy Flynn 2024-11-20 08:37:14 -05:00 committed by Andreas Kling
commit b99a3ec2df
Notes: github-actions[bot] 2024-11-20 14:16:51 +00:00
3 changed files with 13 additions and 7 deletions

View file

@ -4,6 +4,6 @@
const xmlDocument = new DOMParser().parseFromString(`<xml></xml>`, "application/xml");
const cdata = xmlDocument.createCDATASection("PASS");
const clone = cdata.cloneNode();
println(`Cloned CDATASection node data: ${clone.data}`);
println(`Cloned ${clone.nodeName} node data: ${clone.data}`);
});
</script>