ladybird/Tests/LibWeb/Text/input/DOM/CDATASection-cloneNode.html
Timothy Flynn b99a3ec2df 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.
2024-11-20 15:15:56 +01:00

9 lines
350 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
const xmlDocument = new DOMParser().parseFromString(`<xml></xml>`, "application/xml");
const cdata = xmlDocument.createCDATASection("PASS");
const clone = cdata.cloneNode();
println(`Cloned ${clone.nodeName} node data: ${clone.data}`);
});
</script>