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("<div><section><p>Deep</p></section></div>")
System.print(doc.querySelector("div p") != null) // expect: true
System.print(doc.querySelector("div section") != null) // expect: true
System.print(doc.querySelector("section p") != null) // expect: true
System.print(doc.querySelector("div section p") != null) // expect: true
System.print(doc.querySelector("div span") == null) // expect: true
var multi = Document.parse("<div><p>A</p><span><p>B</p></span></div>")
System.print(multi.querySelectorAll("div p").count) // expect: 2
System.print(multi.querySelectorAll("span p").count) // expect: 1