mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Implement HTMLSelectElement.add()
HTMLSelectElement simply defers to its HTMLOptionsCollection.
This commit is contained in:
committed by
Andreas Kling
parent
ff9856a214
commit
27eb70cbba
@@ -34,6 +34,13 @@ RefPtr<HTMLOptionsCollection> const& HTMLSelectElement::options()
|
||||
return m_options;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-select-add
|
||||
DOM::ExceptionOr<void> HTMLSelectElement::add(HTMLOptionOrOptGroupElement element, Optional<HTMLElementOrElementIndex> before)
|
||||
{
|
||||
// Similarly, the add(element, before) method must act like its namesake method on that same options collection.
|
||||
return const_cast<RefPtr<HTMLOptionsCollection>&>(options())->add(move(element), move(before));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-select-option-list
|
||||
NonnullRefPtrVector<HTMLOptionElement> HTMLSelectElement::list_of_options() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user