mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
Tests: Add XHTML tests for CDATA, PIs and Comment nodes in the DOM
This commit is contained in:
parent
f9f854b493
commit
50422eb563
Notes:
github-actions[bot]
2025-07-19 12:57:25 +00:00
Author: https://github.com/ADKaster
Commit: 50422eb563
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5512
Reviewed-by: https://github.com/alimpfard ✅
10 changed files with 132 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<div id="elem"><![CDATA[beep]]><?test test?><!-- I am a comment --><p>Hello</p><p>World</p></div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const elem = document.getElementById("elem");
|
||||
println(`elem.childNodes.length: ${elem.childNodes.length}`);
|
||||
println(`child node 0: ${elem.childNodes[0].toString()}, ${elem.childNodes[0].nodeType}`);
|
||||
println(`child node 1 ${elem.childNodes[1].toString()}, ${elem.childNodes[1].nodeType}`);
|
||||
println(`child node 2: ${elem.childNodes[2].toString()}, ${elem.childNodes[2].nodeType}`);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue