1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:15:06 +00:00

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
parent 446a10a1ac
commit 4912b22e3b
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.");