1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

LibWeb+WebContent: Set ConsoleClient for nested browsing contexts

Before page_did_create_main_document() only initialized ConsoleClient
for top-level browsing context which means that nested browsing context
could not print into the console.

With this change, ConsoleClient is initialized for documents created
for nested browsing context too. One ConsoleClient is shared between
all browsing contexts within the same page.
This commit is contained in:
Aliaksandr Kalenik 2023-09-07 12:11:37 +02:00 committed by Andrew Kaster
parent 490949c6a8
commit b4fe118dff
6 changed files with 10 additions and 10 deletions

View file

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