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
+15
View File
@@ -0,0 +1,15 @@
// retoor <retoor@molodetz.nl>
import "html" for Document
var doc = Document.parse("<ul><li>A</li><li>B</li><li>C</li></ul>")
System.print(doc.querySelector("li:last-child") != null) // expect: true
System.print(doc.querySelector("li:last-child").textContent) // expect: C
var multi = Document.parse("<div><p>First</p><span>Last</span></div>")
System.print(multi.querySelector("span:last-child") != null) // expect: true
System.print(multi.querySelector("span:last-child").textContent) // expect: Last
System.print(multi.querySelector("p:last-child") == null) // expect: true