ShadowRealmGlobalScope.cpp 1020 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/ShadowRealmGlobalScopePrototype.h>
  7. #include <LibWeb/HTML/ShadowRealmGlobalScope.h>
  8. namespace Web::HTML {
  9. JS_DEFINE_ALLOCATOR(ShadowRealmGlobalScope);
  10. ShadowRealmGlobalScope::ShadowRealmGlobalScope(JS::Realm& realm)
  11. : DOM::EventTarget(realm)
  12. {
  13. }
  14. ShadowRealmGlobalScope::~ShadowRealmGlobalScope() = default;
  15. JS::NonnullGCPtr<ShadowRealmGlobalScope> ShadowRealmGlobalScope::create(JS::Realm& realm)
  16. {
  17. return realm.heap().allocate<ShadowRealmGlobalScope>(realm, realm);
  18. }
  19. void ShadowRealmGlobalScope::initialize(JS::Realm&)
  20. {
  21. // 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.
  22. // Base::initialize(realm);
  23. // WEB_SET_PROTOTYPE_FOR_INTERFACE(ShadowRealmGlobalScope);
  24. }
  25. void ShadowRealmGlobalScope::visit_edges(Cell::Visitor& visitor)
  26. {
  27. Base::visit_edges(visitor);
  28. }
  29. }