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
parent 5b6b4d93a3
commit 6c1470994b
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;