forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Ensure
ParentNode.getElementsByClassName()
matches all classes
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
Tests/LibWeb/Text/expected/DOM/getElementsByClassName-multiple.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
document.getElementsByClassName("te st").length: 3 | ||
<DIV id="1" > | ||
<DIV id="2" > | ||
<DIV id="3" > |
17 changes: 17 additions & 0 deletions
17
Tests/LibWeb/Text/input/DOM/getElementsByClassName-multiple.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<script src="../include.js"></script> | ||
<div id="1" class="te st"></div> | ||
<div id="2" class="st te"></div> | ||
<div id="3" class="te te st"></div> | ||
<div id="4" class="te te"></div> | ||
<div id="5" class="st st"></div> | ||
<div id="6" class="test"></div> | ||
<script> | ||
test(() => { | ||
let elements = document.getElementsByClassName("te st"); | ||
println(`document.getElementsByClassName("te st").length: ${elements.length}`); | ||
for (let element of elements) { | ||
printElement(element); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters