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
+19
View File
@@ -0,0 +1,19 @@
// retoor <retoor@molodetz.nl>
import "html" for Document
var doc = Document.parse("<div><p>A</p><p>B</p><p>C</p></div>")
var list = doc.querySelectorAll("p")
System.print(list.item(0).textContent) // expect: A
System.print(list.item(1).textContent) // expect: B
System.print(list.item(2).textContent) // expect: C
System.print(list.item(0).tagName) // expect: P
System.print(list.item(1).tagName) // expect: P
System.print(list.item(2).tagName) // expect: P
var single = doc.querySelectorAll("div")
System.print(single.item(0).tagName) // expect: DIV