From 15c15116dd3d62c5a9ee17f6c80e1782cd2a1a96 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Fri, 1 Nov 2024 01:39:49 +1300 Subject: [PATCH] LibWeb: Ensure fully active document before appending to an iframe --- Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp index 544febf8bf..0ebafd90a6 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp @@ -59,7 +59,7 @@ void HTMLIFrameElement::inserted() HTMLElement::inserted(); // When an iframe element element is inserted into a document whose browsing context is non-null, the user agent must run these steps: - if (in_a_document_tree() && document().browsing_context()) { + if (in_a_document_tree() && document().browsing_context() && document().is_fully_active()) { // 1. Create a new child navigable for element. MUST(create_new_child_navigable(JS::create_heap_function(realm().heap(), [this] { // 3. Process the iframe attributes for element, with initialInsertion set to true.