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:
parent
446a10a1ac
commit
4912b22e3b
6 changed files with 15 additions and 3 deletions
|
@ -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.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue