feat: add complete DOM implementation with Document, Element, and NodeList classes to html module
CI / build-linux (push) Successful in 1m39s

This commit is contained in:
2026-01-26 15:28:49 +00:00
parent fe1f129349
commit 73bb6c7239
79 changed files with 5813 additions and 442 deletions
+17
View File
@@ -0,0 +1,17 @@
// retoor <retoor@molodetz.nl>
import "html" for Document
var doc = Document.parse("<ul><li>A</li><li>B</li><li>C</li><li>D</li><li>E</li></ul>")
System.print(doc.querySelector("li:nth-child(1)") != null) // expect: true
System.print(doc.querySelector("li:nth-child(1)").textContent) // expect: A
System.print(doc.querySelector("li:nth-child(3)") != null) // expect: true
System.print(doc.querySelector("li:nth-child(3)").textContent) // expect: C
System.print(doc.querySelector("li:nth-child(5)") != null) // expect: true
System.print(doc.querySelector("li:nth-child(5)").textContent) // expect: E
System.print(doc.querySelector("li:nth-child(6)") == null) // expect: true