LibWeb/HTML: Add a helper for getting parent <select> for <option>

This commit is contained in:
Shannon Booth 2025-01-26 19:13:17 +13:00 committed by Andrew Kaster
commit 6c1470994b
Notes: github-actions[bot] 2025-01-30 20:57:00 +00:00
2 changed files with 23 additions and 14 deletions

View file

@ -36,10 +36,13 @@ public:
bool disabled() const;
GC::Ptr<HTML::HTMLFormElement> form() const;
GC::Ptr<HTML::HTMLFormElement const> form() const;
virtual Optional<ARIA::Role> default_role() const override;
GC::Ptr<HTMLSelectElement> owner_select_element();
GC::Ptr<HTMLSelectElement const> owner_select_element() const { return const_cast<HTMLOptionElement&>(*this).owner_select_element(); }
private:
friend class Bindings::OptionConstructor;
friend class HTMLSelectElement;