1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-19 00:05:36 +00:00

[assert] document.querySelectorAll

This commit is contained in:
Witold Filipczyk 2024-05-06 14:56:53 +02:00
parent 610eb4b450
commit ecd7662d1a

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<body>
<p class="a">Class a.</p>
<p class="b">Class b.</p>
<script>
function myFunction() {
var x = document.querySelectorAll('.nonexistent');
console.assert(x.length === 0, 'nonexistent elements');
var y = document.querySelectorAll('p');
console.assert(y.length === 2, 'Two p');
}
console.error('document.querySelectorAll.html');
myFunction();
console.exit(0);
</script>
</body>
</html>