mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
Bindings: Implement is_supported_property_index in terms of item_value
Greatly simplifying the code :^)
This commit is contained in:
committed by
Andreas Kling
parent
c5c1a8fcc7
commit
9b1af542e7
@@ -214,11 +214,6 @@ Variant<JS::NonnullGCPtr<DOM::HTMLCollection>, JS::NonnullGCPtr<DOM::Element>, E
|
||||
return get_the_all_named_elements(MUST(FlyString::from_deprecated_fly_string(name_or_index.as_string())));
|
||||
}
|
||||
|
||||
bool HTMLAllCollection::is_supported_property_index(u32 index) const
|
||||
{
|
||||
return index < collect_matching_elements().size();
|
||||
}
|
||||
|
||||
Optional<JS::Value> HTMLAllCollection::item_value(size_t index) const
|
||||
{
|
||||
if (auto value = get_the_all_indexed_element(index))
|
||||
|
||||
Reference in New Issue
Block a user