From d508a02f2534e8c9b745c010039f584acd007b7d Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 4 Feb 2024 07:48:25 -0700 Subject: [PATCH] LibWeb: Ensure that load events are fired for window.open('about:blank') --- Userland/Libraries/LibWeb/HTML/Window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/Window.cpp b/Userland/Libraries/LibWeb/HTML/Window.cpp index 6bacf7a097..5f258a3342 100644 --- a/Userland/Libraries/LibWeb/HTML/Window.cpp +++ b/Userland/Libraries/LibWeb/HTML/Window.cpp @@ -395,7 +395,9 @@ WebIDL::ExceptionOr> Window::open_impl(StringView url, St } // 6. If urlRecord matches about:blank, then perform the URL and history update steps given targetNavigable's active document and urlRecord. - if (url_matches_about_blank(url_record)) { + // FIXME: If we only perform the URL and history update steps here, we never fire the load event for the new window/tab. + // This breaks WPT. See #23067 + if (false && url_matches_about_blank(url_record)) { perform_url_and_history_update_steps(*target_navigable->active_document(), url_record); }