mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-16 16:12:53 +00:00
We now ensure that `Node::is_character_data()` returns true for all nodes of type character data. Previously, calling `Node::length()` on `CDataSection` or `ProcessingInstruction` nodes would return an incorrect value.
11 lines
447 B
HTML
11 lines
447 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const xmlDocument = new DOMParser().parseFromString(`<xml></xml>`, "application/xml");
|
|
const cdata = xmlDocument.createCDATASection("DATA");
|
|
const range = xmlDocument.createRange();
|
|
range.setStart(cdata, 0);
|
|
range.setEnd(cdata, 3);
|
|
println(`range start offset: ${range.startOffset}, end offset: ${range.endOffset}`);
|
|
});
|
|
</script>
|