HTML: Add const qualified form_associated_element_to_html_element

Put the const cast in a common location to make the helper more
convenient to use.
This commit is contained in:
Shannon Booth 2024-07-28 15:52:59 +12:00 committed by Andreas Kling
commit 28ed8e5d0f
Notes: github-actions[bot] 2024-08-01 10:18:02 +00:00
2 changed files with 2 additions and 1 deletions

View file

@ -83,6 +83,7 @@ public:
virtual String value() const { return String {}; }
virtual HTMLElement& form_associated_element_to_html_element() = 0;
HTMLElement const& form_associated_element_to_html_element() const { return const_cast<FormAssociatedElement&>(*this).form_associated_element_to_html_element(); }
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-form-reset-control
virtual void reset_algorithm() {};