1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
elinks/test/ecmascript/assert/document.querySelectorAll.html

23 lines
421 B
HTML
Raw Normal View History

2024-05-06 08:56:53 -04:00
<!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');
2024-05-06 08:56:53 -04:00
}
console.error('document.querySelectorAll.html');
myFunction();
console.exit();
2024-05-06 08:56:53 -04:00
</script>
</body>
</html>