mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Register FormAssociatedElement with their owner form
This will eventually allow us to implement HTMLFormControlsCollection.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 19:19:19 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/78733417a47
@@ -31,7 +31,11 @@ namespace Web::HTML {
|
||||
|
||||
void FormAssociatedElement::set_form(HTMLFormElement* form)
|
||||
{
|
||||
if (m_form)
|
||||
m_form->remove_associated_element({}, form_associated_element_to_html_element());
|
||||
m_form = form;
|
||||
if (m_form)
|
||||
m_form->add_associated_element({}, form_associated_element_to_html_element());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user