1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:47:34 +00:00

LibWeb: Trigger a relayout after setting Element.innerHTML

In addition to tearing down the layout tree, we also want to trigger a
relayout for the changes made by setting Element.innerHTML to take
effect.
This commit is contained in:
Itamar 2022-06-24 22:43:40 +03:00 committed by Andreas Kling
parent 1d81d2e072
commit 9498555256

View file

@ -468,6 +468,7 @@ ExceptionOr<void> Element::set_inner_html(String const& markup)
// NOTE: Since the DOM has changed, we have to rebuild the layout tree.
document().invalidate_layout();
document().set_needs_layout();
return {};
}