LibWeb: Destroy associated navigable when <object> is removed from DOM

This commit is contained in:
Aliaksandr Kalenik 2024-04-17 13:56:55 +02:00 committed by Alexander Kalenik
parent fc0d447adb
commit 68440ed02d
Notes: sideshowbarker 2024-07-17 03:59:29 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -68,6 +68,11 @@ void HTMLObjectElement::form_associated_element_attribute_changed(FlyString cons
}
}
void HTMLObjectElement::form_associated_element_was_removed(DOM::Node*)
{
destroy_the_child_navigable();
}
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-data
String HTMLObjectElement::data() const
{

View file

@ -36,6 +36,7 @@ public:
virtual ~HTMLObjectElement() override;
virtual void form_associated_element_attribute_changed(FlyString const& name, Optional<String> const& value) override;
virtual void form_associated_element_was_removed(DOM::Node*) override;
String data() const;
void set_data(String const& data) { MUST(set_attribute(HTML::AttributeNames::data, data)); }