From 4912b22e3ba4b8aa5bf9cc6a8b41dda39cf44b48 Mon Sep 17 00:00:00 2001 From: davidot Date: Wed, 21 Sep 2022 17:12:00 +0200 Subject: LibWeb+WebContent: Setup the js console client earlier This allows us to print messages in inline scripts. Also add an example of this in the welcome page to test this. --- Userland/Services/WebContent/PageHost.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Userland/Services/WebContent/PageHost.cpp') diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index 883c5fa43a..dc1ee8c04e 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -187,11 +187,13 @@ void PageHost::page_did_start_loading(const URL& url) m_client.async_did_start_loading(url); } -void PageHost::page_did_finish_loading(const URL& url) +void PageHost::page_did_create_main_document() { - // FIXME: This is called after the page has finished loading, which means any log messages - // that happen *while* it is loading (such as inline