| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2024-11-25 14:30:12 +00:00
										 |  |  |  * Copyright (c) 2021-2025, Luke Wilde <luke@ladybird.org> | 
					
						
							| 
									
										
										
										
											2022-03-05 20:56:29 +01:00
										 |  |  |  * Copyright (c) 2022, Linus Groh <linusg@serenityos.org> | 
					
						
							| 
									
										
										
										
											2024-10-21 16:18:25 +13:00
										 |  |  |  * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org> | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-09 11:40:17 +03:30
										 |  |  | #include <LibJS/Forward.h>
 | 
					
						
							| 
									
										
										
										
											2024-10-05 15:33:34 +13:00
										 |  |  | #include <LibURL/Origin.h>
 | 
					
						
							| 
									
										
										
										
											2024-03-18 16:22:27 +13:00
										 |  |  | #include <LibURL/URL.h>
 | 
					
						
							| 
									
										
										
										
											2024-07-16 19:31:31 +01:00
										 |  |  | #include <LibWeb/Forward.h>
 | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | #include <LibWeb/HTML/EventLoop/EventLoop.h>
 | 
					
						
							| 
									
										
										
										
											2022-10-03 20:58:36 +02:00
										 |  |  | #include <LibWeb/HTML/Scripting/ModuleMap.h>
 | 
					
						
							| 
									
										
										
										
											2024-03-05 09:29:14 -07:00
										 |  |  | #include <LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h>
 | 
					
						
							| 
									
										
										
										
											2025-01-02 17:18:49 -08:00
										 |  |  | #include <LibWeb/ServiceWorker/Registration.h>
 | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace Web::HTML { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // https://html.spec.whatwg.org/multipage/webappapis.html#environment
 | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  | struct Environment : public JS::Cell { | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC_CELL(Environment, JS::Cell); | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     virtual ~Environment() override; | 
					
						
							| 
									
										
										
										
											2022-10-13 22:22:41 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-21 10:57:32 +02:00
										 |  |  |     // An id https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-id
 | 
					
						
							| 
									
										
										
										
											2023-12-24 15:44:50 +13:00
										 |  |  |     String id; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-creation-url
 | 
					
						
							| 
									
										
										
										
											2024-03-18 16:22:27 +13:00
										 |  |  |     URL::URL creation_url; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-top-level-creation-url
 | 
					
						
							| 
									
										
										
										
											2025-04-21 16:57:31 +12:00
										 |  |  |     // Null or a URL that represents the creation URL of the "top-level" environment. It is null for workers and worklets.
 | 
					
						
							|  |  |  |     Optional<URL::URL> top_level_creation_url; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-top-level-origin
 | 
					
						
							| 
									
										
										
										
											2024-10-05 15:33:34 +13:00
										 |  |  |     URL::Origin top_level_origin; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-target-browsing-context
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC::Ptr<BrowsingContext> target_browsing_context; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // FIXME: An active service worker https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-active-service-worker
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-execution-ready-flag
 | 
					
						
							|  |  |  |     bool execution_ready { false }; | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-12 12:07:25 +00:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#environment-discarding-steps
 | 
					
						
							|  |  |  |     virtual void discard_environment() { } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  | protected: | 
					
						
							| 
									
										
										
										
											2025-03-12 12:10:14 +00:00
										 |  |  |     Environment() = default; | 
					
						
							| 
									
										
										
										
											2025-04-21 16:57:31 +12:00
										 |  |  |     Environment(String id, URL::URL creation_url, Optional<URL::URL> top_level_creation_url, URL::Origin top_level_origin, GC::Ptr<BrowsingContext> target_browsing_context) | 
					
						
							| 
									
										
										
										
											2025-03-12 12:10:14 +00:00
										 |  |  |         : id(move(id)) | 
					
						
							|  |  |  |         , creation_url(move(creation_url)) | 
					
						
							|  |  |  |         , top_level_creation_url(move(top_level_creation_url)) | 
					
						
							|  |  |  |         , top_level_origin(move(top_level_origin)) | 
					
						
							|  |  |  |         , target_browsing_context(move(target_browsing_context)) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  |     virtual void visit_edges(Cell::Visitor&) override; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum class RunScriptDecision { | 
					
						
							|  |  |  |     Run, | 
					
						
							|  |  |  |     DoNotRun, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object
 | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  | struct EnvironmentSettingsObject : public Environment { | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC_CELL(EnvironmentSettingsObject, Environment); | 
					
						
							| 
									
										
										
										
											2022-09-24 15:39:23 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  |     virtual ~EnvironmentSettingsObject() override; | 
					
						
							| 
									
										
										
										
											2023-08-07 08:41:28 +02:00
										 |  |  |     virtual void initialize(JS::Realm&) override; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-target-browsing-context
 | 
					
						
							|  |  |  |     JS::ExecutionContext& realm_execution_context(); | 
					
						
							| 
									
										
										
										
											2024-10-21 15:25:09 +13:00
										 |  |  |     JS::ExecutionContext const& realm_execution_context() const; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-03 20:58:36 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-module-map
 | 
					
						
							|  |  |  |     ModuleMap& module_map(); | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     virtual GC::Ptr<DOM::Document> responsible_document() = 0; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#api-url-character-encoding
 | 
					
						
							| 
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 |  |  |     virtual String api_url_character_encoding() const = 0; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#api-base-url
 | 
					
						
							| 
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 |  |  |     virtual URL::URL api_base_url() const = 0; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin
 | 
					
						
							| 
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 |  |  |     virtual URL::Origin origin() const = 0; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-13 18:22:11 +02:00
										 |  |  |     // A policy container https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-policy-container
 | 
					
						
							| 
									
										
										
										
											2024-11-25 14:30:12 +00:00
										 |  |  |     virtual GC::Ref<PolicyContainer> policy_container() const = 0; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-cross-origin-isolated-capability
 | 
					
						
							| 
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 |  |  |     virtual CanUseCrossOriginIsolatedAPIs cross_origin_isolated_capability() const = 0; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-07 10:08:14 +00:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-time-origin
 | 
					
						
							|  |  |  |     virtual double time_origin() const = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-02-16 14:01:09 +13:00
										 |  |  |     Optional<URL::URL> parse_url(StringView); | 
					
						
							|  |  |  |     Optional<URL::URL> encoding_parse_url(StringView); | 
					
						
							| 
									
										
										
										
											2024-12-06 16:24:08 -05:00
										 |  |  |     Optional<String> encoding_parse_and_serialize_url(StringView); | 
					
						
							| 
									
										
										
										
											2022-11-15 01:53:22 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  |     JS::Realm& realm(); | 
					
						
							| 
									
										
										
										
											2022-08-28 15:03:45 +01:00
										 |  |  |     JS::Object& global_object(); | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  |     EventLoop& responsible_event_loop(); | 
					
						
							| 
									
										
										
										
											2024-07-22 20:26:48 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://fetch.spec.whatwg.org/#concept-fetch-group
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     Vector<GC::Ref<Fetch::Infrastructure::FetchRecord>>& fetch_group() { return m_fetch_group; } | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-05 09:29:14 -07:00
										 |  |  |     SerializedEnvironmentSettingsObject serialize(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC::Ref<StorageAPI::StorageManager> storage_manager(); | 
					
						
							| 
									
										
										
										
											2024-08-13 20:56:19 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-02 17:18:49 -08:00
										 |  |  |     // https://w3c.github.io/ServiceWorker/#get-the-service-worker-registration-object
 | 
					
						
							|  |  |  |     GC::Ref<ServiceWorker::ServiceWorkerRegistration> get_service_worker_registration_object(ServiceWorker::Registration const&); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://w3c.github.io/ServiceWorker/#get-the-service-worker-object
 | 
					
						
							|  |  |  |     GC::Ref<ServiceWorker::ServiceWorker> get_service_worker_object(ServiceWorker::ServiceWorkerRecord*); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-05 14:35:06 -06:00
										 |  |  |     [[nodiscard]] bool discarded() const { return m_discarded; } | 
					
						
							|  |  |  |     void set_discarded(bool b) { m_discarded = b; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-12 12:07:25 +00:00
										 |  |  |     virtual void discard_environment() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | protected: | 
					
						
							| 
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 |  |  |     explicit EnvironmentSettingsObject(NonnullOwnPtr<JS::ExecutionContext>); | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-16 16:06:16 +02:00
										 |  |  |     virtual void visit_edges(Cell::Visitor&) override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 |  |  |     NonnullOwnPtr<JS::ExecutionContext> m_realm_execution_context; | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC::Ptr<ModuleMap> m_module_map; | 
					
						
							| 
									
										
										
										
											2022-10-03 20:58:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC::Ptr<EventLoop> m_responsible_event_loop; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-16 19:31:31 +01:00
										 |  |  |     // https://fetch.spec.whatwg.org/#concept-fetch-record
 | 
					
						
							|  |  |  |     // A fetch group holds an ordered list of fetch records
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     Vector<GC::Ref<Fetch::Infrastructure::FetchRecord>> m_fetch_group; | 
					
						
							| 
									
										
										
										
											2024-08-13 20:56:19 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://storage.spec.whatwg.org/#api
 | 
					
						
							|  |  |  |     // Each environment settings object has an associated StorageManager object.
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC::Ptr<StorageAPI::StorageManager> m_storage_manager; | 
					
						
							| 
									
										
										
										
											2024-09-05 14:35:06 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-02 17:18:49 -08:00
										 |  |  |     // https://w3c.github.io/ServiceWorker/#environment-settings-object-service-worker-registration-object-map
 | 
					
						
							|  |  |  |     // An environment settings object has a service worker registration object map,
 | 
					
						
							|  |  |  |     // a map where the keys are service worker registrations and the values are ServiceWorkerRegistration objects.
 | 
					
						
							|  |  |  |     HashMap<ServiceWorker::RegistrationKey, GC::Ref<ServiceWorker::ServiceWorkerRegistration>> m_service_worker_registration_object_map; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://w3c.github.io/ServiceWorker/#environment-settings-object-service-worker-object-map
 | 
					
						
							|  |  |  |     // An environment settings object has a service worker object map,
 | 
					
						
							|  |  |  |     // a map where the keys are service workers and the values are ServiceWorker objects.
 | 
					
						
							|  |  |  |     HashMap<ServiceWorker::ServiceWorkerRecord*, GC::Ref<ServiceWorker::ServiceWorker>> m_service_worker_object_map; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-05 14:35:06 -06:00
										 |  |  |     // https://w3c.github.io/ServiceWorker/#service-worker-client-discarded-flag
 | 
					
						
							|  |  |  |     // A service worker client has an associated discarded flag. It is initially unset.
 | 
					
						
							|  |  |  |     bool m_discarded { false }; | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-21 15:25:09 +13:00
										 |  |  | JS::ExecutionContext const& execution_context_of_realm(JS::Realm const&); | 
					
						
							| 
									
										
										
										
											2024-10-21 20:09:02 +13:00
										 |  |  | inline JS::ExecutionContext& execution_context_of_realm(JS::Realm& realm) { return const_cast<JS::ExecutionContext&>(execution_context_of_realm(const_cast<JS::Realm const&>(realm))); } | 
					
						
							| 
									
										
										
										
											2024-10-21 15:25:09 +13:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-21 14:24:06 +13:00
										 |  |  | RunScriptDecision can_run_script(JS::Realm const&); | 
					
						
							|  |  |  | bool is_scripting_enabled(JS::Realm const&); | 
					
						
							|  |  |  | bool is_scripting_disabled(JS::Realm const&); | 
					
						
							| 
									
										
										
										
											2024-10-21 20:09:02 +13:00
										 |  |  | void prepare_to_run_script(JS::Realm&); | 
					
						
							| 
									
										
										
										
											2024-10-21 16:18:25 +13:00
										 |  |  | void clean_up_after_running_script(JS::Realm const&); | 
					
						
							| 
									
										
										
										
											2024-10-21 20:54:39 +13:00
										 |  |  | void prepare_to_run_callback(JS::Realm&); | 
					
						
							|  |  |  | void clean_up_after_running_callback(JS::Realm const&); | 
					
						
							| 
									
										
										
										
											2024-10-26 19:19:04 +13:00
										 |  |  | ModuleMap& module_map_of_realm(JS::Realm&); | 
					
						
							| 
									
										
										
										
											2024-10-25 16:27:26 +13:00
										 |  |  | bool module_type_allowed(JS::Realm const&, StringView module_type); | 
					
						
							| 
									
										
										
										
											2024-12-03 20:31:14 +13:00
										 |  |  | 
 | 
					
						
							|  |  |  | void add_module_to_resolved_module_set(JS::Realm&, String const& serialized_base_url, String const& normalized_specifier, Optional<URL::URL> const& as_url); | 
					
						
							| 
									
										
										
										
											2024-10-21 14:24:06 +13:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | EnvironmentSettingsObject& incumbent_settings_object(); | 
					
						
							|  |  |  | JS::Realm& incumbent_realm(); | 
					
						
							| 
									
										
										
										
											2022-08-28 15:03:45 +01:00
										 |  |  | JS::Object& incumbent_global_object(); | 
					
						
							| 
									
										
										
										
											2024-10-21 13:42:32 +13:00
										 |  |  | 
 | 
					
						
							|  |  |  | JS::Realm& current_principal_realm(); | 
					
						
							| 
									
										
										
										
											2024-10-25 15:49:06 +13:00
										 |  |  | EnvironmentSettingsObject& principal_realm_settings_object(JS::Realm&); | 
					
						
							| 
									
										
										
										
											2024-10-21 13:35:24 +13:00
										 |  |  | EnvironmentSettingsObject& current_principal_settings_object(); | 
					
						
							| 
									
										
										
										
											2024-10-21 13:42:32 +13:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-28 02:49:34 +13:00
										 |  |  | JS::Realm& principal_realm(GC::Ref<JS::Realm>); | 
					
						
							| 
									
										
										
										
											2024-10-21 13:48:44 +13:00
										 |  |  | JS::Object& current_principal_global_object(); | 
					
						
							| 
									
										
										
										
											2024-11-28 04:42:30 +13:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-05 21:01:26 +01:00
										 |  |  | JS::Realm& relevant_realm(JS::Object const&); | 
					
						
							| 
									
										
										
										
											2024-11-28 04:42:30 +13:00
										 |  |  | JS::Realm& relevant_principal_realm(JS::Object const&); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-05 21:01:26 +01:00
										 |  |  | EnvironmentSettingsObject& relevant_settings_object(JS::Object const&); | 
					
						
							| 
									
										
										
										
											2022-08-05 10:55:47 +02:00
										 |  |  | EnvironmentSettingsObject& relevant_settings_object(DOM::Node const&); | 
					
						
							| 
									
										
										
										
											2024-11-28 04:42:30 +13:00
										 |  |  | EnvironmentSettingsObject& relevant_principal_settings_object(JS::Object const&); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-28 15:03:45 +01:00
										 |  |  | JS::Object& relevant_global_object(JS::Object const&); | 
					
						
							| 
									
										
										
										
											2024-11-28 04:42:30 +13:00
										 |  |  | JS::Object& relevant_principal_global_object(JS::Object const&); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-15 01:51:40 +02:00
										 |  |  | JS::Realm& entry_realm(); | 
					
						
							|  |  |  | EnvironmentSettingsObject& entry_settings_object(); | 
					
						
							|  |  |  | JS::Object& entry_global_object(); | 
					
						
							| 
									
										
										
										
											2022-10-13 22:24:15 +02:00
										 |  |  | [[nodiscard]] bool is_secure_context(Environment const&); | 
					
						
							| 
									
										
										
										
											2022-10-13 22:25:08 +02:00
										 |  |  | [[nodiscard]] bool is_non_secure_context(Environment const&); | 
					
						
							| 
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |