diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
index 2bcb0c3cd58..cd321dfb7ee 100644
--- a/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
@@ -65,6 +65,13 @@ void HTMLIFrameElement::attribute_changed(FlyString const& name, Optionalcontent_document_without_origin_check()) {
+ if (auto* body_element = document->body())
+ const_cast(body_element)->set_needs_style_update(true);
+ }
+ }
}
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:html-element-post-connection-steps