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.
This commit is contained in:
davidot 2022-09-21 17:12:00 +02:00 committed by Linus Groh
commit 4912b22e3b
Notes: sideshowbarker 2024-07-17 23:07:41 +09:00
6 changed files with 15 additions and 3 deletions

View file

@ -398,6 +398,8 @@ void FrameLoader::resource_did_load()
document->set_content_type(resource()->mime_type());
browsing_context().set_active_document(document);
if (auto* page = browsing_context().page())
page->client().page_did_create_main_document();
if (!parse_document(*document, resource()->encoded_data())) {
load_error_page(url, "Failed to parse content.");