mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibWeb: Look for first ID _or_ name in HTMLCollection::named_item
Previously we would look for a matching ID, and then for a matching name. If there was an element in the collection which had a matching ID as well as an element with a matching name, we would always return the element with a matching ID irrespective of what order that element was in.
This commit is contained in:
parent
e6c0b4631f
commit
baaaa0008e
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/shannonbooth
Commit: baaaa0008e
Pull-request: https://github.com/SerenityOS/serenity/pull/24118
Reviewed-by: https://github.com/trflynn89 ✅
4 changed files with 35 additions and 11 deletions
6
Tests/LibWeb/Text/expected/DOM/HTMLCollection-order.txt
Normal file
6
Tests/LibWeb/Text/expected/DOM/HTMLCollection-order.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
HTMLCollection
|
||||
anchor1
|
||||
anchor2
|
||||
anchor3
|
||||
anchor1
|
||||
anchor2
|
Loading…
Add table
Add a link
Reference in a new issue