nodelist: implement iterators

This commit is contained in:
Pierre Tachoire
2024-09-25 09:37:14 +02:00
parent 30679d18ee
commit aefab86501
5 changed files with 140 additions and 5 deletions

View File

@@ -435,7 +435,11 @@ pub fn testExecFn(
.{ .src = "document.querySelector(':root').nodeName", .ex = "HTML" },
.{ .src = "document.querySelectorAll('p').length", .ex = "2" },
.{ .src = "document.querySelectorAll('.ok').item(0).id", .ex = "link" },
.{ .src =
\\Array.from(document.querySelectorAll('#content > p#para-empty'))
\\.map(row => row.querySelector('span').textContent)
\\.length;
, .ex = "1" },
};
try checkCases(js_env, &querySelector);