1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-20 01:46:15 -04:00
elinks/test/ecmascript/assert/element.querySelectorAll.html

28 lines
542 B
HTML
Raw Normal View History

2024-05-06 10:31:53 -04:00
<!DOCTYPE html>
<html>
<body>
<p class="a">Class a.</p>
<p class="b">Class b.</p>
<p id="start">
<b class="a">This a class.</b>
<b class="b">This b class.</b>
</p>
<script>
function myFunction() {
var el = document.getElementById('start');
var x = el.querySelectorAll('.nonexistent');
console.assert(x.length === 0, 'nonexistent element');
var y = el.querySelectorAll('.b');
console.assert(y.length === 1, 'b class b.');
}
console.error('element.querySelectorAll.html');
myFunction();
console.exit(0);
</script>
</body>
</html>