LibWeb: Ensure document.getElementsByClassName("") returns no elements

Previously, `document.getElementsByClassName("")` would return a
collection containing all elements in the given document.
This commit is contained in:
Tim Ledbetter 2024-07-22 21:17:17 +01:00 committed by Andreas Kling
commit 0fceede029
Notes: github-actions[bot] 2024-07-23 06:59:20 +00:00
4 changed files with 23 additions and 10 deletions

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<div class=""></div>
<script>
test(() => {
println(`document.getElementsByClassName("").length: ${document.getElementsByClassName("").length}`);
});
</script>