mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02: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
Notes:
github-actions[bot]
2024-07-26 12:27:15 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/9b1af542e7a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/827
@@ -927,13 +927,6 @@ void HTMLFormElement::plan_to_navigate_to(URL::URL url, Variant<Empty, String, P
|
||||
VERIFY(m_planned_navigation);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#the-form-element:supported-property-indices
|
||||
bool HTMLFormElement::is_supported_property_index(u32 index) const
|
||||
{
|
||||
// The supported property indices at any instant are the indices supported by the object returned by the elements attribute at that instant.
|
||||
return index < elements()->length();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#dom-form-item
|
||||
Optional<JS::Value> HTMLFormElement::item_value(size_t index) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user