mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb+WebContent: Create WebContentConsoleClient for every document
Fixes regression introduced in b4fe118dff
The `WebContentConsoleClient` needs to be created not just once, but
for every new document. Although the JS Console window allows
communication only with the active document associated with the
top-level browsing context, we still need a console client for each
iframe's document to ensure their console logs are printed.
In the future, we might consider adding the ability to switch which
document the JS Console window communicates with.
Fixes https://github.com/SerenityOS/serenity/issues/21117
This commit is contained in:
committed by
Andreas Kling
parent
9a61041941
commit
a76ef04ae6
@@ -2652,6 +2652,8 @@ Vector<JS::Handle<HTML::BrowsingContext>> Document::list_of_descendant_browsing_
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#destroy-a-document
|
||||
void Document::destroy()
|
||||
{
|
||||
page()->client().page_did_destroy_document(*this);
|
||||
|
||||
// NOTE: Abort needs to happen before destory. There is currently bug in the spec: https://github.com/whatwg/html/issues/9148
|
||||
// 4. Abort document.
|
||||
abort();
|
||||
|
||||
Reference in New Issue
Block a user