1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

LibWeb: Create and hook up a WindowProxy for each BrowsingContext

All the machinery for this was already in place, we just never created
the actual WindowProxy and installed it.
This commit is contained in:
Andreas Kling 2022-10-15 23:10:56 +02:00
parent 738e770fce
commit 3c548adf9c
Notes: sideshowbarker 2024-07-17 05:18:04 +09:00
5 changed files with 46 additions and 22 deletions

View file

@ -59,6 +59,7 @@
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>
#include <LibWeb/HTML/Window.h>
#include <LibWeb/HTML/WindowProxy.h>
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
#include <LibWeb/Layout/BlockFormattingContext.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
@ -177,9 +178,9 @@ JS::NonnullGCPtr<Document> Document::create_and_initialize(Type type, String con
window = HTML::Window::create(realm);
return window;
},
[](JS::Realm&) -> JS::Object* {
// FIXME: - For the global this binding, use browsingContext's WindowProxy object.
return nullptr;
[&](JS::Realm&) -> JS::Object* {
// - For the global this binding, use browsingContext's WindowProxy object.
return browsing_context->window_proxy();
});
// 6. Let topLevelCreationURL be creationURL.