From 95aa6562db6683435a3d572b371f34f804c96544 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 4 Sep 2021 12:18:22 +0100 Subject: Browser+WebContent: Initialize WebContentConsoleClient earlier With this patch, we now initialize the `WebContentConsoleClient` as soon as the Page has loaded, instead of waiting for the Console Window to be shown. This finally lets us see log messages that happened before the window was opened! :^) However, it is not perfect. Waiting until the page has loaded means we lose any messages that happen *during* page load. Ideally we would initialize the WCCC when the page *starts* loading instead, but it requires that the page has a document and interpreter assigned and accessible. As far as I can tell with my limited knowledge, this is not the case until the page has completed loading. --- Userland/Applications/Browser/Tab.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'Userland/Applications') diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 4b997720e1..26596713ff 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -186,11 +186,6 @@ Tab::Tab(BrowserWindow& window) hooks().on_load_finish = [this](auto&) { if (m_dom_inspector_widget) m_web_content_view->inspect_dom_tree(); - - // FIXME: This is called after the page has finished loading, which means any log messages - // that happen *while* it is loading (such as inline