mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/davidot
Commit: 4912b22e3b
Pull-request: https://github.com/SerenityOS/serenity/pull/15308
Reviewed-by: https://github.com/linusg
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