SyntheticRealmSettings.h 914 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibGC/Ptr.h>
  8. #include <LibJS/Forward.h>
  9. #include <LibWeb/Forward.h>
  10. namespace Web::HTML {
  11. // https://whatpr.org/html/9893/webappapis.html#synthetic-realm-settings-objects
  12. // Each synthetic realm has an associated synthetic realm settings object with the following fields:
  13. struct SyntheticRealmSettings {
  14. // An execution context
  15. // The JavaScript execution context for the scripts within this realm.
  16. NonnullOwnPtr<JS::ExecutionContext> execution_context;
  17. // A principal realm
  18. // The principal realm which this synthetic realm exists within.
  19. GC::Ref<JS::Realm> principal_realm;
  20. // A module map
  21. // A module map that is used when importing JavaScript modules.
  22. GC::Ref<ModuleMap> module_map;
  23. void visit_edges(JS::Cell::Visitor&);
  24. };
  25. }