mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-26 02:44:14 +00:00
39 lines
1,020 B
C++
39 lines
1,020 B
C++
|
|
/*
|
||
|
|
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||
|
|
*
|
||
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
||
|
|
*/
|
||
|
|
|
||
|
|
#include <LibWeb/Bindings/ShadowRealmGlobalScopePrototype.h>
|
||
|
|
#include <LibWeb/HTML/ShadowRealmGlobalScope.h>
|
||
|
|
|
||
|
|
namespace Web::HTML {
|
||
|
|
|
||
|
|
JS_DEFINE_ALLOCATOR(ShadowRealmGlobalScope);
|
||
|
|
|
||
|
|
ShadowRealmGlobalScope::ShadowRealmGlobalScope(JS::Realm& realm)
|
||
|
|
: DOM::EventTarget(realm)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
ShadowRealmGlobalScope::~ShadowRealmGlobalScope() = default;
|
||
|
|
|
||
|
|
JS::NonnullGCPtr<ShadowRealmGlobalScope> ShadowRealmGlobalScope::create(JS::Realm& realm)
|
||
|
|
{
|
||
|
|
return realm.heap().allocate<ShadowRealmGlobalScope>(realm, realm);
|
||
|
|
}
|
||
|
|
|
||
|
|
void ShadowRealmGlobalScope::initialize(JS::Realm&)
|
||
|
|
{
|
||
|
|
// FIXME: This does not work as we do not have any intrinsics in the [HostDefined] of a shadow realm. Figure out how this _should_ work.
|
||
|
|
// Base::initialize(realm);
|
||
|
|
// WEB_SET_PROTOTYPE_FOR_INTERFACE(ShadowRealmGlobalScope);
|
||
|
|
}
|
||
|
|
|
||
|
|
void ShadowRealmGlobalScope::visit_edges(Cell::Visitor& visitor)
|
||
|
|
{
|
||
|
|
Base::visit_edges(visitor);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|